Interface Cache<T>

    • Method Detail

      • createCacheGroup

        void createCacheGroup​(Long gid)
        Must be called prior to adding any group entries
        Parameters:
        gid -
      • removeCacheGroup

        Collection<Long> removeCacheGroup​(Long gid)
        Remove an entire cache group TODO: this should use a callback on the buffermangaer to remove memory entries without materializing all group keys
        Parameters:
        gid -
        Returns:
      • addToCacheGroup

        boolean addToCacheGroup​(Long gid,
                                Long oid)
        Must be called prior to adding an entry
        Parameters:
        gid -
        oid -
        Returns:
        if the add was successful
      • lockForLoad

        T lockForLoad​(Long oid,
                      Serializer<?> serializer)
        Lock the object for load and return an identifier/lock that can be used to retrieve the object.
        Parameters:
        oid -
        serializer -
        Returns:
        the identifier, may be null
      • unlockForLoad

        void unlockForLoad​(T lock)
        Must be called after lockForLoad
      • remove

        Integer remove​(Long gid,
                       Long id)
        Remove an entry from the cache, return the sizeEstimate if the entry existed
        Parameters:
        gid -
        id -
      • shutdown

        void shutdown()
      • getMemoryBufferSpace

        long getMemoryBufferSpace()
      • getCacheGroupCount

        int getCacheGroupCount()