Interface RObjectRx

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      io.reactivex.rxjava3.core.Single<Integer> addListener(ObjectListener listener)
      Adds object event listener
      io.reactivex.rxjava3.core.Completable copy(String host, int port, int database, long timeout)
      Copy object from source Redis instance to destination Redis instance
      io.reactivex.rxjava3.core.Single<Boolean> delete()
      Delete object in mode
      io.reactivex.rxjava3.core.Single<byte[]> dump()
      Returns dump of object
      Codec getCodec()  
      io.reactivex.rxjava3.core.Single<Long> getIdleTime()
      Returns number of seconds spent since last write or read operation over this object.
      String getName()  
      io.reactivex.rxjava3.core.Single<Boolean> isExists()
      Check object existence
      io.reactivex.rxjava3.core.Completable migrate(String host, int port, int database, long timeout)
      Transfer a object from a source Redis instance to a destination Redis instance in mode
      io.reactivex.rxjava3.core.Single<Boolean> move(int database)
      Move object to another database in mode
      io.reactivex.rxjava3.core.Completable removeListener(int listenerId)
      Removes object event listener
      io.reactivex.rxjava3.core.Completable rename(String newName)
      Rename current object key to newName in mode
      io.reactivex.rxjava3.core.Single<Boolean> renamenx(String newName)
      Rename current object key to newName in mode only if new key is not exists
      io.reactivex.rxjava3.core.Completable restore(byte[] state)
      Restores object using its state returned by dump() method.
      io.reactivex.rxjava3.core.Completable restore(byte[] state, long timeToLive, TimeUnit timeUnit)
      Restores object using its state returned by dump() method and set time to live for it.
      io.reactivex.rxjava3.core.Completable restoreAndReplace(byte[] state)
      Restores and replaces object if it already exists.
      io.reactivex.rxjava3.core.Completable restoreAndReplace(byte[] state, long timeToLive, TimeUnit timeUnit)
      Restores and replaces object if it already exists and set time to live for it.
      io.reactivex.rxjava3.core.Single<Long> sizeInMemory()
      Returns bytes amount used by object in Redis memory.
      io.reactivex.rxjava3.core.Single<Boolean> touch()
      Update the last access time of an object.
      io.reactivex.rxjava3.core.Single<Boolean> unlink()
      Delete the objects.
    • Method Detail

      • getIdleTime

        io.reactivex.rxjava3.core.Single<Long> getIdleTime()
        Returns number of seconds spent since last write or read operation over this object.
        Returns:
        number of seconds
      • getCodec

        Codec getCodec()
      • sizeInMemory

        io.reactivex.rxjava3.core.Single<Long> sizeInMemory()
        Returns bytes amount used by object in Redis memory.
        Returns:
        size in bytes
      • restore

        io.reactivex.rxjava3.core.Completable restore(byte[] state)
        Restores object using its state returned by dump() method.
        Parameters:
        state - - state of object
        Returns:
        void
      • restore

        io.reactivex.rxjava3.core.Completable restore(byte[] state,
                                                      long timeToLive,
                                                      TimeUnit timeUnit)
        Restores object using its state returned by dump() method and set time to live for it.
        Parameters:
        state - - state of object
        timeToLive - - time to live of the object
        timeUnit - - time unit
        Returns:
        void
      • restoreAndReplace

        io.reactivex.rxjava3.core.Completable restoreAndReplace(byte[] state)
        Restores and replaces object if it already exists.
        Parameters:
        state - - state of the object
        Returns:
        void
      • restoreAndReplace

        io.reactivex.rxjava3.core.Completable restoreAndReplace(byte[] state,
                                                                long timeToLive,
                                                                TimeUnit timeUnit)
        Restores and replaces object if it already exists and set time to live for it.
        Parameters:
        state - - state of the object
        timeToLive - - time to live of the object
        timeUnit - - time unit
        Returns:
        void
      • dump

        io.reactivex.rxjava3.core.Single<byte[]> dump()
        Returns dump of object
        Returns:
        dump
      • touch

        io.reactivex.rxjava3.core.Single<Boolean> touch()
        Update the last access time of an object.
        Returns:
        true if object was touched else false
      • unlink

        io.reactivex.rxjava3.core.Single<Boolean> unlink()
        Delete the objects. Actual removal will happen later asynchronously.

        Requires Redis 4.0+

        Returns:
        true if it was exist and deleted else false
      • copy

        io.reactivex.rxjava3.core.Completable copy(String host,
                                                   int port,
                                                   int database,
                                                   long timeout)
        Copy object from source Redis instance to destination Redis instance
        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
      • migrate

        io.reactivex.rxjava3.core.Completable migrate(String host,
                                                      int port,
                                                      int database,
                                                      long timeout)
        Transfer a object from a source Redis instance to a destination Redis instance in mode
        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

        io.reactivex.rxjava3.core.Single<Boolean> move(int database)
        Move object to another database in mode
        Parameters:
        database - - number of Redis database
        Returns:
        true if key was moved false if not
      • delete

        io.reactivex.rxjava3.core.Single<Boolean> delete()
        Delete object in mode
        Returns:
        true if object was deleted false if not
      • rename

        io.reactivex.rxjava3.core.Completable rename(String newName)
        Rename current object key to newName in mode
        Parameters:
        newName - - new name of object
        Returns:
        void
      • renamenx

        io.reactivex.rxjava3.core.Single<Boolean> renamenx(String newName)
        Rename current object key to newName in mode only if new key is not exists
        Parameters:
        newName - - new name of object
        Returns:
        true if object has been renamed successfully and false otherwise
      • isExists

        io.reactivex.rxjava3.core.Single<Boolean> isExists()
        Check object existence
        Returns:
        true if object exists and false otherwise
      • removeListener

        io.reactivex.rxjava3.core.Completable removeListener(int listenerId)
        Removes object event listener
        Parameters:
        listenerId - - listener id