Package org.redisson

Class RedissonGeo<V>

  • Type Parameters:
    V - value
    All Implemented Interfaces:
    <V>, <V>>, <V>>

    public class RedissonGeo<V>
    extends RedissonScoredSortedSet<V>
    implements RGeo<V>
    Geospatial items holder
    Author:
    Nikita Koksharov
    • Method Detail

      • addAsync

        public > addAsync​(double longitude,
                                      double latitude,
                                      V member)
        Description copied from interface: RGeoAsync
        Adds geospatial member.
        Specified by:
        addAsync in interface RGeoAsync<V>
        Parameters:
        longitude - - longitude of object
        latitude - - latitude of object
        member - - object itself
        Returns:
        number of elements added to the sorted set, not including elements already existing for which the score was updated
      • add

        public long add​(double longitude,
                        double latitude,
                        V member)
        Description copied from interface: RGeo
        Adds geospatial member.
        Specified by:
        add in interface RGeo<V>
        Parameters:
        longitude - - longitude of object
        latitude - - latitude of object
        member - - object itself
        Returns:
        number of elements added to the sorted set, not including elements already existing for which the score was updated
      • add

        public long add​(GeoEntry... entries)
        Description copied from interface: RGeo
        Adds geospatial members.
        Specified by:
        add in interface RGeo<V>
        Parameters:
        entries - - objects
        Returns:
        number of elements added to the sorted set, not including elements already existing for which the score was updated
      • addAsync

        public > addAsync​(GeoEntry... entries)
        Description copied from interface: RGeoAsync
        Adds geospatial members.
        Specified by:
        addAsync in interface RGeoAsync<V>
        Parameters:
        entries - - objects
        Returns:
        number of elements added to the sorted set, not including elements already existing for which the score was updated
      • addIfExists

        public  addIfExists​(double longitude,
                                   double latitude,
                                   V member)
        Description copied from interface: RGeo
        Adds geospatial member only if it's already exists.

        Requires Redis 6.2.0 and higher.

        Specified by:
        addIfExists in interface RGeo<V>
        Parameters:
        longitude - - longitude of object
        latitude - - latitude of object
        member - - object itself
        Returns:
        number of elements added to the sorted set
      • addIfExists

        public long addIfExists​(GeoEntry... entries)
        Description copied from interface: RGeo
        Adds geospatial members only if it's already exists.

        Requires Redis 6.2.0 and higher.

        Specified by:
        addIfExists in interface RGeo<V>
        Parameters:
        entries - - objects
        Returns:
        number of elements added to the sorted set
      • addIfExistsAsync

        public > addIfExistsAsync​(double longitude,
                                                 double latitude,
                                                 V member)
        Description copied from interface: RGeoAsync
        Adds geospatial member only if it's already exists.

        Requires Redis 6.2.0 and higher.

        Specified by:
        addIfExistsAsync in interface RGeoAsync<V>
        Parameters:
        longitude - - longitude of object
        latitude - - latitude of object
        member - - object itself
        Returns:
        number of elements added to the sorted set
      • addIfExistsAsync

        public > addIfExistsAsync​(GeoEntry... entries)
        Description copied from interface: RGeoAsync
        Adds geospatial members only if it's already exists.

        Requires Redis 6.2.0 and higher.

        Specified by:
        addIfExistsAsync in interface RGeoAsync<V>
        Parameters:
        entries - - objects
        Returns:
        number of elements added to the sorted set
      • tryAdd

        public boolean tryAdd​(double longitude,
                              double latitude,
                              V member)
        Description copied from interface: RGeo
        Adds geospatial member only if has not been added before.

        Requires Redis 6.2.0 and higher.

        Specified by:
        tryAdd in interface RGeo<V>
        Parameters:
        longitude - - longitude of object
        latitude - - latitude of object
        member - - object itself
        Returns:
        number of elements added to the sorted set
      • tryAdd

        public long tryAdd​(GeoEntry... entries)
        Description copied from interface: RGeo
        Adds geospatial members only if has not been added before.

        Requires Redis 6.2.0 and higher.

        Specified by:
        tryAdd in interface RGeo<V>
        Parameters:
        entries - - objects
        Returns:
        number of elements added to the sorted set
      • tryAddAsync

        public > tryAddAsync​(double longitude,
                                            double latitude,
                                            V member)
        Description copied from interface: RGeoAsync
        Adds geospatial member only if has not been added before.

        Requires Redis 6.2.0 and higher.

        Specified by:
        tryAddAsync in interface RGeoAsync<V>
        Parameters:
        longitude - - longitude of object
        latitude - - latitude of object
        member - - object itself
        Returns:
        number of elements added to the sorted set
      • tryAddAsync

        public > tryAddAsync​(GeoEntry... entries)
        Description copied from interface: RGeoAsync
        Adds geospatial members only if has not been added before.

        Requires Redis 6.2.0 and higher.

        Specified by:
        tryAddAsync in interface RGeoAsync<V>
        Parameters:
        entries - - objects
        Returns:
        number of elements added to the sorted set
      • dist

        public  dist​(V firstMember,
                           V secondMember,
                           GeoUnit geoUnit)
        Description copied from interface: RGeo
        Returns distance between members in GeoUnit units.
        Specified by:
        dist in interface RGeo<V>
        Parameters:
        firstMember - - first object
        secondMember - - second object
        geoUnit - - geo unit
        Returns:
        distance
      • distAsync

        public > distAsync​(V firstMember,
                                         V secondMember,
                                         GeoUnit geoUnit)
        Description copied from interface: RGeoAsync
        Returns distance between members in GeoUnit units.
        Specified by:
        distAsync in interface RGeoAsync<V>
        Parameters:
        firstMember - - first object
        secondMember - - second object
        geoUnit - - geo unit
        Returns:
        distance
      • hash

        public <> hash​(V... members)
        Description copied from interface: RGeo
        Returns 11 characters long Geohash string mapped by defined member.
        Specified by:
        hash in interface RGeo<V>
        Parameters:
        members - - objects
        Returns:
        hash mapped by object
      • hashAsync

        public <>> hashAsync​(V... members)
        Description copied from interface: RGeoAsync
        Returns 11 characters Geohash string mapped by defined member.
        Specified by:
        hashAsync in interface RGeoAsync<V>
        Parameters:
        members - - objects
        Returns:
        hash mapped by object
      • pos

        public <V,​GeoPosition> pos​(V... members)
        Description copied from interface: RGeo
        Returns geo-position mapped by defined member.
        Specified by:
        pos in interface RGeo<V>
        Parameters:
        members - - objects
        Returns:
        geo position mapped by object
      • posAsync

        public <V,​GeoPosition>> posAsync​(V... members)
        Description copied from interface: RGeoAsync
        Returns geo-position mapped by defined member.
        Specified by:
        posAsync in interface RGeoAsync<V>
        Parameters:
        members - - objects
        Returns:
        geo position mapped by object
      • search

        public <V> search​(GeoSearchArgs args)
        Description copied from interface: RGeo
        Returns the members of a sorted set, which are within the borders of specified search conditions.

        Usage examples:

         List objects = geo.search(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)
                                         .order(GeoOrder.ASC)
                                         .count(1)));
         
         List objects = geo.search(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)));
         

        Requires Redis 3.2.10 and higher.

        Specified by:
        search in interface RGeo<V>
        Parameters:
        args - - search conditions object
        Returns:
        list of memebers
      • searchAsync

        public <V>> searchAsync​(GeoSearchArgs args)
        Description copied from interface: RGeoAsync
        Returns the members of a sorted set, which are within the borders of specified search conditions.

        Usage examples:

         RFuture objects = geo.searchAsync(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)
                                         .order(GeoOrder.ASC)
                                         .count(1)));
         
         RFuture objects = geo.searchAsync(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)));
         

        Requires Redis 3.2.10 and higher.

        Specified by:
        searchAsync in interface RGeoAsync<V>
        Parameters:
        args - - search conditions object
        Returns:
        list of memebers
      • searchWithDistance

        public <> searchWithDistance​(GeoSearchArgs args)
        Description copied from interface: RGeo
        Returns the distance mapped by member of a sorted set, which are within the borders of specified search conditions.

        Usage examples:

         List objects = geo.searchWithDistance(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)
                                         .order(GeoOrder.ASC)
                                         .count(1)));
         
         List objects = geo.searchWithDistance(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)));
         

        Requires Redis 3.2.10 and higher.

        Specified by:
        searchWithDistance in interface RGeo<V>
        Parameters:
        args - - search conditions object
        Returns:
        distance mapped by object
      • searchWithDistanceAsync

        public <>> searchWithDistanceAsync​(GeoSearchArgs args)
        Description copied from interface: RGeoAsync
        Returns the distance mapped by member of a sorted set, which are within the borders of specified search conditions.

        Usage examples:

         RFuture objects = geo.searchWithDistanceAsync(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)
                                         .order(GeoOrder.ASC)
                                         .count(1)));
         
         RFuture objects = geo.searchWithDistanceAsync(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)));
         

        Requires Redis 3.2.10 and higher.

        Specified by:
        searchWithDistanceAsync in interface RGeoAsync<V>
        Parameters:
        args - - search conditions object
        Returns:
        distance mapped by object
      • searchWithPosition

        public <V,​GeoPosition> searchWithPosition​(GeoSearchArgs args)
        Description copied from interface: RGeo
        Returns the position mapped by member of a sorted set, which are within the borders of specified search conditions.

        Usage examples:

         List objects = geo.searchWithPosition(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)
                                         .order(GeoOrder.ASC)
                                         .count(1)));
         
         List objects = geo.searchWithPosition(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)));
         

        Requires Redis 3.2.10 and higher.

        Specified by:
        searchWithPosition in interface RGeo<V>
        Parameters:
        args - - search conditions object
        Returns:
        position mapped by object
      • searchWithPositionAsync

        public <V,​GeoPosition>> searchWithPositionAsync​(GeoSearchArgs args)
        Description copied from interface: RGeoAsync
        Returns the position mapped by member of a sorted set, which are within the borders of specified search conditions.

        Usage examples:

         List objects = geo.searchWithPosition(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)
                                         .order(GeoOrder.ASC)
                                         .count(1)));
         
         List objects = geo.searchWithPosition(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)));
         

        Requires Redis 3.2.10 and higher.

        Specified by:
        searchWithPositionAsync in interface RGeoAsync<V>
        Parameters:
        args - - search conditions object
        Returns:
        position mapped by object
      • radius

        public <V> radius​(double longitude,
                              double latitude,
                              double radius,
                              GeoUnit geoUnit)
        Specified by:
        radius in interface RGeo<V>
      • radiusAsync

        public <V>> radiusAsync​(double longitude,
                                            double latitude,
                                            double radius,
                                            GeoUnit geoUnit)
        Specified by:
        radiusAsync in interface RGeoAsync<V>
      • radius

        public <V> radius​(double longitude,
                              double latitude,
                              double radius,
                              GeoUnit geoUnit,
                              int count)
        Specified by:
        radius in interface RGeo<V>
      • radiusAsync

        public <V>> radiusAsync​(double longitude,
                                            double latitude,
                                            double radius,
                                            GeoUnit geoUnit,
                                            int count)
        Specified by:
        radiusAsync in interface RGeoAsync<V>
      • radius

        public <V> radius​(double longitude,
                              double latitude,
                              double radius,
                              GeoUnit geoUnit,
                              GeoOrder geoOrder)
        Specified by:
        radius in interface RGeo<V>
      • radiusAsync

        public <V>> radiusAsync​(double longitude,
                                            double latitude,
                                            double radius,
                                            GeoUnit geoUnit,
                                            GeoOrder geoOrder)
        Specified by:
        radiusAsync in interface RGeoAsync<V>
      • radius

        public <V> radius​(double longitude,
                              double latitude,
                              double radius,
                              GeoUnit geoUnit,
                              GeoOrder geoOrder,
                              int count)
        Specified by:
        radius in interface RGeo<V>
      • radiusAsync

        public <V>> radiusAsync​(double longitude,
                                            double latitude,
                                            double radius,
                                            GeoUnit geoUnit,
                                            GeoOrder geoOrder,
                                            int count)
        Specified by:
        radiusAsync in interface RGeoAsync<V>
      • radiusWithDistance

        public <> radiusWithDistance​(double longitude,
                                                      double latitude,
                                                      double radius,
                                                      GeoUnit geoUnit)
        Specified by:
        radiusWithDistance in interface RGeo<V>
      • radiusWithDistanceAsync

        public <>> radiusWithDistanceAsync​(double longitude,
                                                                    double latitude,
                                                                    double radius,
                                                                    GeoUnit geoUnit)
        Specified by:
        radiusWithDistanceAsync in interface RGeoAsync<V>
      • radiusWithDistance

        public <> radiusWithDistance​(double longitude,
                                                      double latitude,
                                                      double radius,
                                                      GeoUnit geoUnit,
                                                      int count)
        Specified by:
        radiusWithDistance in interface RGeo<V>
      • radiusWithDistanceAsync

        public <>> radiusWithDistanceAsync​(double longitude,
                                                                    double latitude,
                                                                    double radius,
                                                                    GeoUnit geoUnit,
                                                                    int count)
        Specified by:
        radiusWithDistanceAsync in interface RGeoAsync<V>
      • radiusWithDistance

        public <> radiusWithDistance​(double longitude,
                                                      double latitude,
                                                      double radius,
                                                      GeoUnit geoUnit,
                                                      GeoOrder geoOrder)
        Specified by:
        radiusWithDistance in interface RGeo<V>
      • radiusWithDistance

        public <> radiusWithDistance​(double longitude,
                                                      double latitude,
                                                      double radius,
                                                      GeoUnit geoUnit,
                                                      GeoOrder geoOrder,
                                                      int count)
        Specified by:
        radiusWithDistance in interface RGeo<V>
      • radius

        public <V> radius​(V member,
                              double radius,
                              GeoUnit geoUnit)
        Specified by:
        radius in interface RGeo<V>
      • radius

        public <V> radius​(V member,
                              double radius,
                              GeoUnit geoUnit,
                              int count)
        Specified by:
        radius in interface RGeo<V>
      • radiusAsync

        public <V>> radiusAsync​(V member,
                                            double radius,
                                            GeoUnit geoUnit,
                                            int count)
        Specified by:
        radiusAsync in interface RGeoAsync<V>
      • radius

        public <V> radius​(V member,
                              double radius,
                              GeoUnit geoUnit,
                              GeoOrder geoOrder)
        Specified by:
        radius in interface RGeo<V>
      • radius

        public <V> radius​(V member,
                              double radius,
                              GeoUnit geoUnit,
                              GeoOrder geoOrder,
                              int count)
        Specified by:
        radius in interface RGeo<V>
      • radiusWithDistance

        public <> radiusWithDistance​(V member,
                                                      double radius,
                                                      GeoUnit geoUnit)
        Specified by:
        radiusWithDistance in interface RGeo<V>
      • radiusWithDistance

        public <> radiusWithDistance​(V member,
                                                      double radius,
                                                      GeoUnit geoUnit,
                                                      int count)
        Specified by:
        radiusWithDistance in interface RGeo<V>
      • radiusStoreTo

        public long radiusStoreTo​( destName,
                                  double longitude,
                                  double latitude,
                                  double radius,
                                  GeoUnit geoUnit)
        Specified by:
        radiusStoreTo in interface RGeo<V>
      • radiusStoreToAsync

        public > radiusStoreToAsync​( destName,
                                                double longitude,
                                                double latitude,
                                                double radius,
                                                GeoUnit geoUnit)
        Specified by:
        radiusStoreToAsync in interface RGeoAsync<V>
      • storeSearchTo

        public long storeSearchTo​( destName,
                                  GeoSearchArgs args)
        Description copied from interface: RGeo
        Finds the members of a sorted set, which are within the borders of specified search conditions.

        Stores result to destName.

        Usage examples:

         long count = geo.storeSearchTo(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)
                                         .order(GeoOrder.ASC)
                                         .count(1)));
         
         long count = geo.storeSearchTo(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)));
         
        Specified by:
        storeSearchTo in interface RGeo<V>
        args - - search conditions object
        Returns:
        length of result
      • storeSearchToAsync

        public > storeSearchToAsync​( destName,
                                                GeoSearchArgs args)
        Description copied from interface: RGeoAsync
        Finds the members of a sorted set, which are within the borders of specified search conditions.

        Stores result to destName.

        Usage examples:

         long count = geo.storeSearchTo(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)
                                         .order(GeoOrder.ASC)
                                         .count(1)));
         
         long count = geo.storeSearchTo(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)));
         
        Specified by:
        storeSearchToAsync in interface RGeoAsync<V>
        args - - search conditions object
        Returns:
        length of result
      • radiusStoreTo

        public long radiusStoreTo​( destName,
                                  double longitude,
                                  double latitude,
                                  double radius,
                                  GeoUnit geoUnit,
                                  int count)
        Specified by:
        radiusStoreTo in interface RGeo<V>
      • radiusStoreToAsync

        public > radiusStoreToAsync​( destName,
                                                double longitude,
                                                double latitude,
                                                double radius,
                                                GeoUnit geoUnit,
                                                int count)
        Specified by:
        radiusStoreToAsync in interface RGeoAsync<V>
      • radiusStoreTo

        public long radiusStoreTo​( destName,
                                  double longitude,
                                  double latitude,
                                  double radius,
                                  GeoUnit geoUnit,
                                  GeoOrder geoOrder,
                                  int count)
        Specified by:
        radiusStoreTo in interface RGeo<V>
      • radiusStoreToAsync

        public > radiusStoreToAsync​( destName,
                                                double longitude,
                                                double latitude,
                                                double radius,
                                                GeoUnit geoUnit,
                                                GeoOrder geoOrder,
                                                int count)
        Specified by:
        radiusStoreToAsync in interface RGeoAsync<V>
      • radiusStoreTo

        public long radiusStoreTo​( destName,
                                  V member,
                                  double radius,
                                  GeoUnit geoUnit)
        Specified by:
        radiusStoreTo in interface RGeo<V>
      • radiusStoreTo

        public long radiusStoreTo​( destName,
                                  V member,
                                  double radius,
                                  GeoUnit geoUnit,
                                  int count)
        Specified by:
        radiusStoreTo in interface RGeo<V>
      • radiusStoreToAsync

        public > radiusStoreToAsync​( destName,
                                                V member,
                                                double radius,
                                                GeoUnit geoUnit,
                                                int count)
        Specified by:
        radiusStoreToAsync in interface RGeoAsync<V>
      • radiusStoreTo

        public long radiusStoreTo​( destName,
                                  V member,
                                  double radius,
                                  GeoUnit geoUnit,
                                  GeoOrder geoOrder,
                                  int count)
        Specified by:
        radiusStoreTo in interface RGeo<V>
      • storeSortedSearchTo

        public long storeSortedSearchTo​( destName,
                                        GeoSearchArgs args)
        Description copied from interface: RGeo
        Finds the members of a sorted set, which are within the borders of specified search conditions.

        Stores result to destName sorted by distance.

        Usage examples:

         long count = geo.storeSortedSearchTo(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)
                                         .order(GeoOrder.ASC)
                                         .count(1)));
         
         long count = geo.storeSortedSearchTo(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)));
         
        Specified by:
        storeSortedSearchTo in interface RGeo<V>
        args - - search conditions object
        Returns:
        length of result
      • storeSortedSearchToAsync

        public > storeSortedSearchToAsync​( destName,
                                                      GeoSearchArgs args)
        Description copied from interface: RGeoAsync
        Finds the members of a sorted set, which are within the borders of specified search conditions.

        Stores result to destName sorted by distance.

        Usage examples:

         long count = geo.storeSortedSearchTo(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)
                                         .order(GeoOrder.ASC)
                                         .count(1)));
         
         long count = geo.storeSortedSearchTo(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)));
         
        Specified by:
        storeSortedSearchToAsync in interface RGeoAsync<V>
        args - - search conditions object
        Returns:
        length of result
      • radiusStoreSortedToAsync

        public > radiusStoreSortedToAsync​( destName,
                                                      double longitude,
                                                      double latitude,
                                                      double radius,
                                                      GeoUnit geoUnit)
        Specified by:
        radiusStoreSortedToAsync in interface RGeoAsync<V>
      • radiusStoreSortedToAsync

        public > radiusStoreSortedToAsync​( destName,
                                                      double longitude,
                                                      double latitude,
                                                      double radius,
                                                      GeoUnit geoUnit,
                                                      int count)
        Specified by:
        radiusStoreSortedToAsync in interface RGeoAsync<V>
      • radiusStoreSortedToAsync

        public > radiusStoreSortedToAsync​( destName,
                                                      double longitude,
                                                      double latitude,
                                                      double radius,
                                                      GeoUnit geoUnit,
                                                      GeoOrder geoOrder,
                                                      int count)
        Specified by:
        radiusStoreSortedToAsync in interface RGeoAsync<V>
      • radiusStoreSortedTo

        public long radiusStoreSortedTo​( destName,
                                        double longitude,
                                        double latitude,
                                        double radius,
                                        GeoUnit geoUnit)
        Specified by:
        radiusStoreSortedTo in interface RGeo<V>
      • radiusStoreSortedTo

        public long radiusStoreSortedTo​( destName,
                                        double longitude,
                                        double latitude,
                                        double radius,
                                        GeoUnit geoUnit,
                                        int count)
        Specified by:
        radiusStoreSortedTo in interface RGeo<V>
      • radiusStoreSortedTo

        public long radiusStoreSortedTo​( destName,
                                        double longitude,
                                        double latitude,
                                        double radius,
                                        GeoUnit geoUnit,
                                        GeoOrder geoOrder,
                                        int count)
        Specified by:
        radiusStoreSortedTo in interface RGeo<V>
      • radiusStoreSortedTo

        public long radiusStoreSortedTo​( destName,
                                        V member,
                                        double radius,
                                        GeoUnit geoUnit)
        Specified by:
        radiusStoreSortedTo in interface RGeo<V>
      • radiusStoreSortedTo

        public long radiusStoreSortedTo​( destName,
                                        V member,
                                        double radius,
                                        GeoUnit geoUnit,
                                        int count)
        Specified by:
        radiusStoreSortedTo in interface RGeo<V>
      • radiusStoreSortedTo

        public long radiusStoreSortedTo​( destName,
                                        V member,
                                        double radius,
                                        GeoUnit geoUnit,
                                        GeoOrder geoOrder,
                                        int count)
        Specified by:
        radiusStoreSortedTo in interface RGeo<V>
      • expire

        public boolean expire​(long timeToLive,
                               timeUnit)
        Description copied from interface: RExpirable
        Set a timeout for object. After the timeout has expired, the key will automatically be deleted.
        Specified by:
        expire in interface RExpirable
        Parameters:
        timeToLive - - timeout before object will be deleted
        timeUnit - - timeout time unit
        Returns:
        true if the timeout was set and false if not
      • expireAsync

        public > expireAsync​(long timeToLive,
                                             timeUnit)
        Description copied from interface: RExpirableAsync
        Set a timeout for object in async mode. After the timeout has expired, the key will automatically be deleted.
        Specified by:
        expireAsync in interface RExpirableAsync
        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 boolean expireAt​(long timestamp)
        Description copied from interface: RExpirable
        Specified by:
        expireAt in interface RExpirable
        Parameters:
        timestamp - - expire date in milliseconds (Unix timestamp)
        Returns:
        true if the timeout was set and false if not
      • expire

        public boolean expire​( instant)
        Description copied from interface: RExpirable
        Set an expire date for object. When expire date comes the key will automatically be deleted.
        Specified by:
        expire in interface RExpirable
        Parameters:
        instant - - expire date
        Returns:
        true if the timeout was set and false if not
      • expireAsync

        public > expireAsync​( instant)
        Description copied from interface: RExpirableAsync
        Set an expire date for object. When expire date comes the key will automatically be deleted.
        Specified by:
        expireAsync in interface RExpirableAsync
        Parameters:
        instant - - expire date
        Returns:
        true if the timeout was set and false if not
      • expireAt

        public boolean expireAt​( timestamp)
        Description copied from interface: RExpirable
        Specified by:
        expireAt in interface RExpirable
        Parameters:
        timestamp - - expire date
        Returns:
        true if the timeout was set and false if not
      • clearExpire

        public boolean clearExpire()
        Description copied from interface: RExpirable
        Clear an expire timeout or expire date for object.
        Specified by:
        clearExpire in interface RExpirable
        Returns:
        true if timeout was removed false if object does not exist or does not have an associated timeout
      • clearExpireAsync

        public > clearExpireAsync()
        Description copied from interface: RExpirableAsync
        Clear an expire timeout or expire date for object in async mode. Object will not be deleted.
        Specified by:
        clearExpireAsync in interface RExpirableAsync
        Returns:
        true if the timeout was cleared and false if not
      • remainTimeToLive

        public long remainTimeToLive()
        Description copied from interface: RExpirable
        Remaining time to live of Redisson object that has a timeout
        Specified by:
        remainTimeToLive in interface RExpirable
        Returns:
        time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
      • remainTimeToLiveAsync

        public > remainTimeToLiveAsync()
        Description copied from interface: RExpirableAsync
        Remaining time to live of Redisson object that has a timeout
        Specified by:
        remainTimeToLiveAsync in interface RExpirableAsync
        Returns:
        time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
      • expireAsync

        protected > expireAsync​(long timeToLive,
                                                timeUnit,
                                               ... keys)
      • expireAtAsync

        protected > expireAtAsync​(long timestamp,
                                                 ... keys)
      • clearExpireAsync

        protected > clearExpireAsync​(... keys)