public class TokenResponse extends Object implements ICorfuPayload<TokenResponse>, IToken
ICorfuPayload.PayloadConstructor<T>
Modifier and Type | Field and Description |
---|---|
static byte[] |
NO_CONFLICT_KEY |
static UUID |
NO_CONFLICT_STREAM |
constructorMap, lookup
Constructor and Description |
---|
TokenResponse(io.netty.buffer.ByteBuf buf)
Deserialization Constructor from a Bytebuf to TokenResponse.
|
TokenResponse(Token token,
Map<UUID,Long> backpointerMap)
Constructor for TokenResponse.
|
Modifier and Type | Method and Description |
---|---|
void |
doSerialize(io.netty.buffer.ByteBuf buf) |
long |
getEpoch()
Get the epoch of the token, which represents the epoch the
token is valid in.
|
long |
getSequence()
The value of the token, which represents the global address
on the log the token is for.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
enumMapFromBuffer, fromBuffer, fromBuffer, listFromBuffer, mapFromBuffer, rangeFromBuffer, rangeSetFromBuffer, serialize, setFromBuffer
getBackpointerMap
public static byte[] NO_CONFLICT_KEY
public static UUID NO_CONFLICT_STREAM
public TokenResponse(Token token, Map<UUID,Long> backpointerMap)
token
- token valuebackpointerMap
- map of backpointers for all requested streamspublic TokenResponse(io.netty.buffer.ByteBuf buf)
buf
- The buffer to deserializepublic void doSerialize(io.netty.buffer.ByteBuf buf)
doSerialize
in interface ICorfuPayload<TokenResponse>
public long getSequence()
IToken
getSequence
in interface IToken
Copyright © 2019 CorfuDB. All rights reserved.