Class CacheDataSink

    • Field Detail

      • DEFAULT_FRAGMENT_SIZE

        public static final long DEFAULT_FRAGMENT_SIZE
        Deprecated.
        Default fragmentSize recommended for caching use cases.
        See Also:
        Constant Field Values
      • DEFAULT_BUFFER_SIZE

        public static final int DEFAULT_BUFFER_SIZE
        Deprecated.
        Default buffer size in bytes.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CacheDataSink

        public CacheDataSink​(Cache cache,
                             long fragmentSize)
        Deprecated.
        Constructs an instance using DEFAULT_BUFFER_SIZE.
        Parameters:
        cache - The cache into which data should be written.
        fragmentSize - For requests that should be fragmented into multiple cache files, this is the maximum size of a cache file in bytes. If set to C.LENGTH_UNSET then no fragmentation will occur. Using a small value allows for finer-grained cache eviction policies, at the cost of increased overhead both on the cache implementation and the file system. Values under (2 * 1024 * 1024) are not recommended.
      • CacheDataSink

        public CacheDataSink​(Cache cache,
                             long fragmentSize,
                             int bufferSize)
        Deprecated.
        Parameters:
        cache - The cache into which data should be written.
        fragmentSize - For requests that should be fragmented into multiple cache files, this is the maximum size of a cache file in bytes. If set to C.LENGTH_UNSET then no fragmentation will occur. Using a small value allows for finer-grained cache eviction policies, at the cost of increased overhead both on the cache implementation and the file system. Values under (2 * 1024 * 1024) are not recommended.
        bufferSize - The buffer size in bytes for writing to a cache file. A zero or negative value disables buffering.