Top Description Fields Constructors Methods
io.grpc

public final Class InternalLogId

extends Object
Class Inheritance
Annotations
@Internal
Static Imports
com.google.common.base.Preconditions.checkArgument, .Preconditions.checkNotNull

An internal class. Do not use.

An object that has an ID that is unique within the JVM, primarily for debug logging.

Field Summary

Modifier and TypeField and Description
private final String
private final long
private static final AtomicLong
private final String

Constructor Summary

AccessConstructor and Description
pack-priv
InternalLogId(String typeName, String details, long id)

Method Summary

Modifier and TypeMethod and Description
public static InternalLogId
allocate(Class<?>
the "Type" to be used when logging this id. The short name of this class will be used, or else a default if the class is anonymous.
type
,
String
a short, human readable string that describes the object the id is attached to. Typically this will be an address or target.
details
)

Creates a log id.

public static InternalLogId
allocate(String
the "Type" to be used when logging this id.
typeName
,
String
a short, human readable string that describes the object the id is attached to. Typically this will be an address or target.
details
)

Creates a log id.

private static String
public String
public long
pack-priv static long
public String
public String
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

detailsback to summary
private final String details
Annotations
@Nullable
idback to summary
private final long id
idAllocback to summary
private static final AtomicLong idAlloc
typeNameback to summary
private final String typeName

Constructor Detail

InternalLogIdback to summary
pack-priv InternalLogId(String typeName, String details, long id)

Method Detail

allocateback to summary
public static InternalLogId allocate(Class<?> type, String details)

Creates a log id.

Parameters
type:Class<?>

the "Type" to be used when logging this id. The short name of this class will be used, or else a default if the class is anonymous.

details:String

a short, human readable string that describes the object the id is attached to. Typically this will be an address or target.

allocateback to summary
public static InternalLogId allocate(String typeName, String details)

Creates a log id.

Parameters
typeName:String

the "Type" to be used when logging this id.

details:String

a short, human readable string that describes the object the id is attached to. Typically this will be an address or target.

getClassNameback to summary
private static String getClassName(Class<?> type)
getDetailsback to summary
public String getDetails()
Annotations
@Nullable
getIdback to summary
public long getId()
getNextIdback to summary
pack-priv static long getNextId()
getTypeNameback to summary
public String getTypeName()
shortNameback to summary
public String shortName()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override