Interface RExpirableAsync

All Superinterfaces:
RObjectAsync
All Known Subinterfaces:
RAtomicDouble, RAtomicDoubleAsync, RAtomicLong, RAtomicLongAsync, RBinaryStream, RBitSet, RBitSetAsync, RBlockingDeque<V>, RBlockingDequeAsync<V>, RBlockingQueue<V>, RBlockingQueueAsync<V>, RBloomFilter<T>, RBoundedBlockingQueue<V>, RBoundedBlockingQueueAsync<V>, RBucket<V>, RBucketAsync<V>, RCollectionAsync<V>, RDelayedQueue<V>, RDeque<V>, RDequeAsync<V>, RDoubleAdder, RExpirable, RGeo<V>, RGeoAsync<V>, RHyperLogLog<V>, RHyperLogLogAsync<V>, RIdGenerator, RIdGeneratorAsync, RJsonBucket<V>, RJsonBucketAsync<V>, RLexSortedSet, RLexSortedSetAsync, RList<V>, RListAsync<V>, RListMultimap<K,V>, RListMultimapCache<K,V>, RLiveObject, RLocalCachedMap<K,V>, RLongAdder, RMap<K,V>, RMapAsync<K,V>, RMapCache<K,V>, RMapCacheAsync<K,V>, RMultimap<K,V>, RMultimapAsync<K,V>, RMultimapCache<K,V>, RMultimapCacheAsync<K,V>, RPermitExpirableSemaphore, RPermitExpirableSemaphoreAsync, RPriorityBlockingDeque<V>, RPriorityBlockingQueue<V>, RPriorityDeque<V>, RPriorityQueue<V>, RQueue<V>, RQueueAsync<V>, RRateLimiter, RRateLimiterAsync, RReliableTopic, RReliableTopicAsync, RRingBuffer<V>, RRingBufferAsync<V>, RScoredSortedSet<V>, RScoredSortedSetAsync<V>, RSemaphore, RSemaphoreAsync, RSet<V>, RSetAsync<V>, RSetCache<V>, RSetCacheAsync<V>, RSetMultimap<K,V>, RSetMultimapCache<K,V>, RStream<K,V>, RStreamAsync<K,V>, RTimeSeries<V,L>, RTimeSeriesAsync<V,L>, RTransferQueue<V>, RTransferQueueAsync<V>
All Known Implementing Classes:
ExpireAtOperation.RedissonBucketExtended, ExpireOperation.RedissonBucketExtended, RedissonAtomicDouble, RedissonAtomicLong, RedissonBaseAdder, RedissonBaseLock, RedissonBinaryStream, RedissonBitSet, RedissonBlockingDeque, RedissonBlockingQueue, RedissonBloomFilter, RedissonBoundedBlockingQueue, RedissonBucket, RedissonDelayedQueue, RedissonDeque, RedissonDoubleAdder, RedissonFairLock, RedissonFencedLock, RedissonGeo, RedissonHyperLogLog, RedissonIdGenerator, RedissonJsonBucket, RedissonLexSortedSet, RedissonList, RedissonListMultimap, RedissonListMultimapCache, RedissonListMultimapValues, RedissonLocalCachedMap, RedissonLock, RedissonLongAdder, RedissonMap, RedissonMapCache, RedissonMultimap, RedissonPermitExpirableSemaphore, RedissonPriorityBlockingDeque, RedissonPriorityBlockingQueue, RedissonPriorityDeque, RedissonPriorityQueue, RedissonQueue, RedissonQueueSemaphore, RedissonRateLimiter, RedissonReadLock, RedissonReadWriteLock, RedissonReliableTopic, RedissonRingBuffer, RedissonScoredSortedSet, RedissonSemaphore, RedissonSet, RedissonSetCache, RedissonSetMultimap, RedissonSetMultimapCache, RedissonSetMultimapValues, RedissonSpinLock, RedissonStream, RedissonSubList, RedissonTimeSeries, RedissonTransactionalBucket, RedissonTransactionalLocalCachedMap, RedissonTransactionalLock, RedissonTransactionalMap, RedissonTransactionalMapCache, RedissonTransactionalReadLock, RedissonTransactionalSet, RedissonTransactionalSetCache, RedissonTransactionalWriteLock, RedissonTransferQueue, RedissonWriteLock

public interface RExpirableAsync extends RObjectAsync
Base async interface for all Redisson objects which supports expiration (TTL)
Author:
Nikita Koksharov
  • Method Details

    • expireAsync

      @Deprecated RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit)
      Deprecated.
      Parameters:
      timeToLive - - timeout before object will be deleted
      timeUnit - - timeout time unit
      Returns:
      true if the timeout was set and false if not
    • expireAtAsync

      @Deprecated RFuture<Boolean> expireAtAsync(Date timestamp)
      Deprecated.
      Parameters:
      timestamp - - expire date
      Returns:
      true if the timeout was set and false if not
    • expireAtAsync

      @Deprecated RFuture<Boolean> expireAtAsync(long timestamp)
      Deprecated.
      Parameters:
      timestamp - - expire date in milliseconds (Unix timestamp)
      Returns:
      true if the timeout was set and false if not
    • expireAsync

      RFuture<Boolean> expireAsync(Instant time)
      Set an expire date for object. When expire date comes the key will automatically be deleted.
      Parameters:
      time - - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfSetAsync

      RFuture<Boolean> expireIfSetAsync(Instant time)
      Sets an expiration date for this object only if it has been already set. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfNotSetAsync

      RFuture<Boolean> expireIfNotSetAsync(Instant time)
      Sets an expiration date for this object only if it hasn't been set before. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfGreaterAsync

      RFuture<Boolean> expireIfGreaterAsync(Instant time)
      Sets an expiration date for this object only if it's greater than expiration date set before. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfLessAsync

      RFuture<Boolean> expireIfLessAsync(Instant time)
      Sets an expiration date for this object only if it's less than expiration date set before. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireAsync

      RFuture<Boolean> expireAsync(Duration duration)
      Set a timeout for object. After the timeout has expired, the key will automatically be deleted.
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfSetAsync

      RFuture<Boolean> expireIfSetAsync(Duration duration)
      Sets a timeout for this object only if it has been already set. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfNotSetAsync

      RFuture<Boolean> expireIfNotSetAsync(Duration duration)
      Sets a timeout for this object only if it hasn't been set before. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfGreaterAsync

      RFuture<Boolean> expireIfGreaterAsync(Duration duration)
      Sets a timeout for this object only if it's greater than timeout set before. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfLessAsync

      RFuture<Boolean> expireIfLessAsync(Duration duration)
      Sets a timeout for this object only if it's less than timeout set before. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • clearExpireAsync

      RFuture<Boolean> clearExpireAsync()
      Clear an expire timeout or expire date for object in async mode. Object will not be deleted.
      Returns:
      true if the timeout was cleared and false if not
    • remainTimeToLiveAsync

      RFuture<Long> remainTimeToLiveAsync()
      Remaining time to live of Redisson object that has a timeout
      Returns:
      time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
    • getExpireTimeAsync

      RFuture<Long> getExpireTimeAsync()
      Expiration time of Redisson object that has a timeout

      Requires Redis 7.0.0 and higher.

      Returns:
      expiration time