T
- The serialized data type of the tokenpublic class GenericTokenEntry<T> extends AbstractTokenEntry<T>
clock
Constructor and Description |
---|
GenericTokenEntry(TrackingToken token,
Serializer serializer,
Class<T> contentType,
String processorName,
int segment)
Initializes a new token entry for given
token , process and segment . |
GenericTokenEntry(T token,
String tokenType,
String timestamp,
String owner,
String processorName,
int segment,
Class<T> contentType)
Initializes a token entry from existing data.
|
Modifier and Type | Method and Description |
---|---|
String |
getProcessorName()
Returns the name of the process to which this token belongs.
|
int |
getSegment()
Returns the segment index of the process to which this token belongs.
|
void |
updateToken(TrackingToken token,
Serializer serializer)
Update this entry with the given
token , serializing it using given serializer . |
claim, getOwner, getSerializedToken, getToken, getTokenType, mayClaim, releaseClaim, timestamp, timestampAsString, updateToken
public GenericTokenEntry(TrackingToken token, Serializer serializer, Class<T> contentType, String processorName, int segment)
token
, process
and segment
. The given serializer
can be used to serialize the token before it is stored.token
- The tracking token to storeserializer
- The serializer to use when storing a serialized tokenprocessorName
- The name of the processor to which this token belongssegment
- The segment of the processor to which this token belongscontentType
- The content type after serializationpublic GenericTokenEntry(T token, String tokenType, String timestamp, String owner, String processorName, int segment, Class<T> contentType)
token
- the serialized tokentokenType
- the serialized type of the tokentimestamp
- the timestamp of the tokenowner
- the owner of the tokenprocessorName
- The name of the processor to which this token belongssegment
- The segment of the processor to which this token belongscontentType
- The content type after serializationpublic String getProcessorName()
AbstractTokenEntry
getProcessorName
in class AbstractTokenEntry<T>
public int getSegment()
AbstractTokenEntry
getSegment
in class AbstractTokenEntry<T>
public void updateToken(TrackingToken token, Serializer serializer)
AbstractTokenEntry
token
, serializing it using given serializer
.updateToken
in class AbstractTokenEntry<T>
token
- The token to update the entry withserializer
- The serializer to serialize data withCopyright © 2010–2024. All rights reserved.