Interface RObjectAsync

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      > addListenerAsync​(ObjectListener listener)
      Adds object event listener
      >  host, int port, int database, long timeout)
      Copy object from source Redis instance to destination Redis instance in async mode
      > deleteAsync()
      Delete object in async mode
      RFuture<byte[]> dumpAsync()
      Returns dump of object
      > getIdleTimeAsync()
      Returns number of seconds spent since last write or read operation over this object.
      > isExistsAsync()
      Check object existence in async mode.
      >  host, int port, int database, long timeout)
      Transfer object from source Redis instance to destination Redis instance in async mode
      > moveAsync​(int database)
      Move object to another database in async mode
      > removeListenerAsync​(int listenerId)
      Removes object event listener
      >  newName)
      Rename current object key to newName in async mode
      >  newName)
      Rename current object key to newName in async mode only if new key is not exists
      > restoreAndReplaceAsync​(byte[] state)
      Restores and replaces object if it already exists.
      > restoreAndReplaceAsync​(byte[] state, long timeToLive,  timeUnit)
      Restores and replaces object if it already exists and set time to live for it.
      > restoreAsync​(byte[] state)
      Restores object using its state returned by dumpAsync() method.
      > restoreAsync​(byte[] state, long timeToLive,  timeUnit)
      Restores object using its state returned by dumpAsync() method and set time to live for it.
      > sizeInMemoryAsync()
      Returns bytes amount used by object in Redis memory.
      > touchAsync()
      Update the last access time of an object in async mode.
      > unlinkAsync()
      Delete the objects.
    • Method Detail

      • getIdleTimeAsync

        > getIdleTimeAsync()
        Returns number of seconds spent since last write or read operation over this object.
        Returns:
        number of seconds
      • sizeInMemoryAsync

        > sizeInMemoryAsync()
        Returns bytes amount used by object in Redis memory.
        Returns:
        size in bytes
      • restoreAsync

        > restoreAsync​(byte[] state)
        Restores object using its state returned by dumpAsync() method.
        Parameters:
        state - - state of object
        Returns:
        void
      • restoreAsync

        > restoreAsync​(byte[] state,
                                   long timeToLive,
                                    timeUnit)
        Restores object using its state returned by dumpAsync() 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
      • restoreAndReplaceAsync

        > restoreAndReplaceAsync​(byte[] state)
        Restores and replaces object if it already exists.
        Parameters:
        state - - state of the object
        Returns:
        void
      • restoreAndReplaceAsync

        > restoreAndReplaceAsync​(byte[] state,
                                             long timeToLive,
                                              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
      • dumpAsync

        RFuture<byte[]> dumpAsync()
        Returns dump of object
        Returns:
        dump
      • touchAsync

        > touchAsync()
        Update the last access time of an object in async mode.
        Returns:
        true if object was touched else false
      • migrateAsync

        > migrateAsync​( host,
                                   int port,
                                   int database,
                                   long timeout)
        Transfer object from source Redis instance to destination Redis instance in async 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
      • copyAsync

        > copyAsync​( host,
                                int port,
                                int database,
                                long timeout)
        Copy object from source Redis instance to destination Redis instance in async 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
      • moveAsync

        > moveAsync​(int database)
        Move object to another database in async mode
        Parameters:
        database - - number of Redis database
        Returns:
        true if key was moved false if not
      • deleteAsync

        > deleteAsync()
        Delete object in async mode
        Returns:
        true if object was deleted false if not
      • unlinkAsync

        > unlinkAsync()
        Delete the objects. Actual removal will happen later asynchronously.

        Requires Redis 4.0+

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

        > renameAsync​( newName)
        Rename current object key to newName in async mode
        Parameters:
        newName - - new name of object
        Returns:
        void
      • renamenxAsync

        > renamenxAsync​( newName)
        Rename current object key to newName in async 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
      • isExistsAsync

        > isExistsAsync()
        Check object existence in async mode.
        Returns:
        true if object exists and false otherwise
      • removeListenerAsync

        > removeListenerAsync​(int listenerId)
        Removes object event listener
        Parameters:
        listenerId - - listener id