Package org.redisson.api
Interface RBinaryStreamReactive
- All Superinterfaces:
RBucketReactive<byte[]>
,RExpirableReactive
,RObjectReactive
Binary stream holder stores a sequence of bytes.
Maximum size of stream is limited to 512Mb.
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionlong
position()
Returns current channel's positionvoid
position
(long newPosition) Sets channel's positionreactor.core.publisher.Mono
<Integer> read
(ByteBuffer buf) Reads a sequence of bytes into defined buffer.reactor.core.publisher.Mono
<Integer> write
(ByteBuffer buf) Writes a sequence of bytes from defined buffer.Methods inherited from interface org.redisson.api.RBucketReactive
addListener, compareAndSet, findCommon, findCommonLength, get, getAndClearExpire, getAndDelete, getAndExpire, getAndExpire, getAndSet, getAndSet, getAndSet, set, set, set, setAndKeepTTL, setIfAbsent, setIfAbsent, setIfExists, setIfExists, setIfExists, size, trySet, trySet
Methods inherited from interface org.redisson.api.RExpirableReactive
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLive
Methods inherited from interface org.redisson.api.RObjectReactive
copy, copy, copy, copyAndReplace, copyAndReplace, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
-
Method Details
-
position
long position()Returns current channel's position- Returns:
- current position
-
position
void position(long newPosition) Sets channel's position- Parameters:
newPosition
- - new position
-
read
Reads a sequence of bytes into defined buffer.- Parameters:
buf
- buffer object into which bytes are read- Returns:
- amount of read bytes
-
write
Writes a sequence of bytes from defined buffer.- Parameters:
buf
- buffer object from which bytes are transferred- Returns:
- amount of written bytes
-