Class RedissonReadWriteLockReactive

    • Method Detail

      • expire

        public org.reactivestreams.Publisher<Boolean> expire​(long timeToLive,
                                                             TimeUnit timeUnit)
        Description copied from interface: RExpirableReactive
        Set a timeout for object in mode. After the timeout has expired, the key will automatically be deleted.
        Specified by:
        expire in interface RExpirableReactive
        Parameters:
        timeToLive - - timeout before object will be deleted
        timeUnit - - timeout time unit
        Returns:
        true if the timeout was set and false if not
      • expireAt

        public org.reactivestreams.Publisher<Boolean> expireAt​(long timestamp)
        Description copied from interface: RExpirableReactive
        Set an expire date for object in mode. When expire date comes the key will automatically be deleted.
        Specified by:
        expireAt in interface RExpirableReactive
        Parameters:
        timestamp - - expire date in milliseconds (Unix timestamp)
        Returns:
        true if the timeout was set and false if not
      • expireAt

        public org.reactivestreams.Publisher<Boolean> expireAt​(Date timestamp)
        Description copied from interface: RExpirableReactive
        Set an expire date for object in mode. When expire date comes the key will automatically be deleted.
        Specified by:
        expireAt in interface RExpirableReactive
        Parameters:
        timestamp - - expire date
        Returns:
        true if the timeout was set and false if not
      • clearExpire

        public org.reactivestreams.Publisher<Boolean> clearExpire()
        Description copied from interface: RExpirableReactive
        Clear an expire timeout or expire date for object in mode. Object will not be deleted.
        Specified by:
        clearExpire in interface RExpirableReactive
        Returns:
        true if the timeout was cleared and false if not
      • remainTimeToLive

        public org.reactivestreams.Publisher<Long> remainTimeToLive()
        Description copied from interface: RExpirableReactive
        Get remaining time to live of object in milliseconds.
        Specified by:
        remainTimeToLive in interface RExpirableReactive
        Returns:
        time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
      • reactive

        public <R> org.reactivestreams.Publisher<R> reactive​(reactor.fn.Supplier<RFuture<R>> supplier)
      • newSucceeded

        protected <V> reactor.rx.Stream<V> newSucceeded​(V result)
      • encode

        protected io.netty.buffer.ByteBuf encode​(Object value)
      • encodeMapKey

        protected io.netty.buffer.ByteBuf encodeMapKey​(Object value)
      • encodeMapValue

        protected io.netty.buffer.ByteBuf encodeMapValue​(Object value)
      • restore

        public org.reactivestreams.Publisher<Void> restore​(byte[] state,
                                                           long timeToLive,
                                                           TimeUnit timeUnit)
        Description copied from interface: RObjectReactive
        Restores object using its state returned by RObjectReactive.dump() method and set time to live for it.
        Specified by:
        restore in interface RObjectReactive
        Parameters:
        state - - state of object
        timeToLive - - time to live of the object
        timeUnit - - time unit
        Returns:
        void
      • restoreAndReplace

        public org.reactivestreams.Publisher<Void> restoreAndReplace​(byte[] state)
        Description copied from interface: RObjectReactive
        Restores and replaces object if it already exists.
        Specified by:
        restoreAndReplace in interface RObjectReactive
        Parameters:
        state - - state of the object
        Returns:
        void
      • restoreAndReplace

        public org.reactivestreams.Publisher<Void> restoreAndReplace​(byte[] state,
                                                                     long timeToLive,
                                                                     TimeUnit timeUnit)
        Description copied from interface: RObjectReactive
        Restores and replaces object if it already exists and set time to live for it.
        Specified by:
        restoreAndReplace in interface RObjectReactive
        Parameters:
        state - - state of the object
        timeToLive - - time to live of the object
        timeUnit - - time unit
        Returns:
        void
      • dump

        public org.reactivestreams.Publisher<byte[]> dump()
        Description copied from interface: RObjectReactive
        Returns dump of object
        Specified by:
        dump in interface RObjectReactive
        Returns:
        dump
      • touch

        public org.reactivestreams.Publisher<Boolean> touch()
        Description copied from interface: RObjectReactive
        Update the last access time of an object.
        Specified by:
        touch in interface RObjectReactive
        Returns:
        true if object was touched else false
      • unlink

        public org.reactivestreams.Publisher<Boolean> unlink()
        Description copied from interface: RObjectReactive
        Delete the objects. Actual removal will happen later asynchronously.

        Requires Redis 4.0+

        Specified by:
        unlink in interface RObjectReactive
        Returns:
        true if it was exist and deleted else false
      • copy

        public org.reactivestreams.Publisher<Void> copy​(String host,
                                                        int port,
                                                        int database,
                                                        long timeout)
        Description copied from interface: RObjectReactive
        Copy object from source Redis instance to destination Redis instance
        Specified by:
        copy in interface RObjectReactive
        Parameters:
        host - - destination host
        port - - destination port
        database - - destination database
        timeout - - maximum idle time in any moment of the communication with the destination instance in milliseconds
        Returns:
        void
      • rename

        public org.reactivestreams.Publisher<Void> rename​(String newName)
        Description copied from interface: RObjectReactive
        Rename current object key to newName in mode
        Specified by:
        rename in interface RObjectReactive
        Parameters:
        newName - - new name of object
        Returns:
        void
      • migrate

        public org.reactivestreams.Publisher<Void> migrate​(String host,
                                                           int port,
                                                           int database,
                                                           long timeout)
        Description copied from interface: RObjectReactive
        Transfer a object from a source Redis instance to a destination Redis instance in mode
        Specified by:
        migrate in interface RObjectReactive
        Parameters:
        host - - destination host
        port - - destination port
        database - - destination database
        timeout - - maximum idle time in any moment of the communication with the destination instance in milliseconds
        Returns:
        void
      • move

        public org.reactivestreams.Publisher<Boolean> move​(int database)
        Description copied from interface: RObjectReactive
        Move object to another database in mode
        Specified by:
        move in interface RObjectReactive
        Parameters:
        database - - number of Redis database
        Returns:
        true if key was moved false if not
      • renamenx

        public org.reactivestreams.Publisher<Boolean> renamenx​(String newName)
        Description copied from interface: RObjectReactive
        Rename current object key to newName in mode only if new key is not exists
        Specified by:
        renamenx in interface RObjectReactive
        Parameters:
        newName - - new name of object
        Returns:
        true if object has been renamed successfully and false otherwise
      • delete

        public org.reactivestreams.Publisher<Boolean> delete()
        Description copied from interface: RObjectReactive
        Delete object in mode
        Specified by:
        delete in interface RObjectReactive
        Returns:
        true if object was deleted false if not
      • isExists

        public org.reactivestreams.Publisher<Boolean> isExists()
        Description copied from interface: RObjectReactive
        Check object existence
        Specified by:
        isExists in interface RObjectReactive
        Returns:
        true if object exists and false otherwise