public class InMemoryResumableFramesStore extends Object implements ResumableFramesStore
Disposable.Composite, Disposable.Swap| Constructor and Description |
|---|
InMemoryResumableFramesStore(String tag,
int cacheSizeBytes) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
long |
frameImpliedPosition() |
long |
framePosition() |
boolean |
isDisposed() |
Mono<Void> |
onClose()
Returns a
Mono that terminates when the instance is terminated by any reason. |
void |
releaseFrames(long remoteImpliedPos)
Release frames from tail of the store up to remote implied position
|
void |
resumableFrameReceived(ByteBuf frame)
Received resumable frame as defined by RSocket protocol.
|
Flux<ByteBuf> |
resumeStream() |
Mono<Void> |
saveFrames(Flux<ByteBuf> frames)
Save resumable frames for potential resumption
|
public InMemoryResumableFramesStore(String tag, int cacheSizeBytes)
public Mono<Void> saveFrames(Flux<ByteBuf> frames)
ResumableFramesStoresaveFrames in interface ResumableFramesStoreframes - Flux of resumable framesMono which completes once all resume frames are writtenpublic void releaseFrames(long remoteImpliedPos)
ResumableFramesStorereleaseFrames in interface ResumableFramesStorepublic Flux<ByteBuf> resumeStream()
resumeStream in interface ResumableFramesStoreFlux of frames from store tail to head. It should terminate with error if
frames are not continuouspublic long framePosition()
framePosition in interface ResumableFramesStorepublic long frameImpliedPosition()
frameImpliedPosition in interface ResumableFramesStorepublic void resumableFrameReceived(ByteBuf frame)
ResumableFramesStoreresumableFrameReceived in interface ResumableFramesStorepublic Mono<Void> onClose()
CloseableMono that terminates when the instance is terminated by any reason. Note, in
case of error termination, the cause of error will be propagated as an error signal through
Subscriber.onError(Throwable). Otherwise, Subscriber.onComplete() will be called.public void dispose()
dispose in interface Disposablepublic boolean isDisposed()
isDisposed in interface Disposable