public final class ResumeFrame extends Object
RESUME frame.Disposable.Composite, Disposable.SwapFRAME_TYPE_SHIFT| Modifier and Type | Method and Description |
|---|---|
static ResumeFrame |
createResumeFrame(ByteBuf byteBuf)
Creates the
RESUME frame. |
static ResumeFrame |
createResumeFrame(ByteBufAllocator byteBufAllocator,
ByteBuf resumeIdentificationToken,
long lastReceivedServerPosition,
long firstAvailableClientPosition)
Creates the
RESUME frame. |
static ResumeFrame |
createResumeFrame(ByteBufAllocator byteBufAllocator,
int majorVersion,
int minorVersion,
ByteBuf resumeIdentificationToken,
long lastReceivedServerPosition,
long firstAvailableClientPosition)
Creates the
RESUME frame. |
static ResumeFrame |
createResumeFrame(ByteBufAllocator byteBufAllocator,
String resumeIdentificationToken,
long lastReceivedServerPosition,
long firstAvailableClientPosition)
Creates the
RESUME frame. |
void |
dispose() |
boolean |
equals(Object o) |
long |
getFirstAvailableClientPosition()
Returns the first available client position.
|
FrameType |
getFrameType()
Returns the
FrameType. |
long |
getLastReceivedServerPosition()
Returns the last received server position.
|
int |
getMajorVersion()
Returns the major version of the protocol.
|
int |
getMinorVersion()
Returns the minor version of the protocol.
|
String |
getResumeIdentificationTokenAsUtf8()
Returns the resume identification token as a UTF-8
String. |
ByteBuf |
getUnsafeFrame()
Returns the frame directly.
|
ByteBuf |
getUnsafeResumeIdentificationToken()
Returns the resume identification token directly.
|
int |
hashCode() |
<T> T |
mapResumeIdentificationToken(Function<ByteBuf,T> function)
Exposes the resume identification token for mapping to a different type.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitconsumeFrame, mapFrameisDisposedpublic static ResumeFrame createResumeFrame(ByteBufAllocator byteBufAllocator, String resumeIdentificationToken, long lastReceivedServerPosition, long firstAvailableClientPosition)
RESUME frame.byteBufAllocator - the ByteBufAllocator to useresumeIdentificationToken - the resume identification tokenlastReceivedServerPosition - the last received server positionfirstAvailableClientPosition - the first available client positionRESUME frameNullPointerException - if byteBufAllocator or resumeIdentificationToken
is nullpublic static ResumeFrame createResumeFrame(ByteBufAllocator byteBufAllocator, ByteBuf resumeIdentificationToken, long lastReceivedServerPosition, long firstAvailableClientPosition)
RESUME frame.byteBufAllocator - the ByteBufAllocator to useresumeIdentificationToken - the resume identification tokenlastReceivedServerPosition - the last received server positionfirstAvailableClientPosition - the first available client positionRESUME frameNullPointerException - if byteBufAllocator or resumeIdentificationToken
is nullpublic static ResumeFrame createResumeFrame(ByteBuf byteBuf)
RESUME frame.byteBuf - the ByteBuf representing the frameRESUME frame.NullPointerException - if byteBuf is nullpublic static ResumeFrame createResumeFrame(ByteBufAllocator byteBufAllocator, int majorVersion, int minorVersion, ByteBuf resumeIdentificationToken, long lastReceivedServerPosition, long firstAvailableClientPosition)
RESUME frame.byteBufAllocator - the ByteBufAllocator to usemajorVersion - the major version of the protocolminorVersion - the minor version of the protocolresumeIdentificationToken - the resume identification tokenlastReceivedServerPosition - the last received server positionfirstAvailableClientPosition - the first available client positionRESUME frameNullPointerException - if byteBufAllocator or resumeIdentificationToken
is nullpublic long getFirstAvailableClientPosition()
public long getLastReceivedServerPosition()
public int getMajorVersion()
public int getMinorVersion()
public String getResumeIdentificationTokenAsUtf8()
String.Stringpublic ByteBuf getUnsafeResumeIdentificationToken()
Note: this resume identification token will be outside of the Frame's
lifecycle and may be released at any time. It is highly recommended that you ByteBuf.retain() the resume identification token if you store it.
mapResumeIdentificationToken(Function)public <T> T mapResumeIdentificationToken(Function<ByteBuf,T> function)
T - the different typefunction - the function to transform the resume identification token to a different typeNullPointerException - if function is nullpublic final void dispose()
dispose in interface Disposablepublic FrameType getFrameType()
FrameFrameType.getFrameType in interface FrameFrameTypepublic final ByteBuf getUnsafeFrame()
FrameNote: this frame will be outside of the Frame's lifecycle and may be released
at any time. It is highly recommended that you ByteBuf.retain() the frame if you store
it.
getUnsafeFrame in interface FrameFrame.consumeFrame(Consumer),
Frame.mapFrame(Function)