Class PersistentRedisCache

    • Constructor Detail

      • PersistentRedisCache

        public PersistentRedisCache​(java.lang.String redisHost,
                                    int redisPort,
                                    int redisExpireSeconds,
                                    int redisSocketTimeout,
                                    int redisConnectionTimeout,
                                    int redisMinConnections,
                                    int redisMaxConnections,
                                    int redisMaxTotalConnections,
                                    int redisDBIndex,
                                    IOMonitor redisCacheIOMonitor)
    • Method Detail

      • containsSegment

        public boolean containsSegment​(long msb,
                                       long lsb)
        Description copied from interface: PersistentCache
        Check if the segment exists in the cache.
        Parameters:
        msb - the most significant bits of the identifier of the segment
        lsb - the least significant bits of the identifier of the segment
        Returns:
        true if the segment exists
      • writeSegment

        public void writeSegment​(long msb,
                                 long lsb,
                                 Buffer buffer)
        Description copied from interface: PersistentCache
        Writes the segment to the cache.
        Parameters:
        msb - the most significant bits of the identifier of the segment
        lsb - the least significant bits of the identifier of the segment
        buffer - the byte buffer containing the segment data
      • cleanUp

        public void cleanUp()
        Description copied from interface: PersistentCache
        Purges the cache entries according to the implementation policy (e.g. maximum cache size, maximum number of entries, etc.)