Class FederatedReadCache

  • public class FederatedReadCache
    extends Object
    • Constructor Detail

      • FederatedReadCache

        public FederatedReadCache()
    • Method Detail

      • get

        public CacheableData<?> get​(String fname,
                                    boolean putPlaceholder)
        Get the data from the ReadCacheEntry corresponding to the specified filename, if the data from this filename has already been read. Otherwise, create a new ReadCacheEntry for the filename and return null to indicate that the data is not cached yet.
        fname - the filename of the read data
        putPlaceholder - whether to put a placeholder if there is no mapping for the filename
        the CacheableData object if it is cached, otherwise null
      • setData

        public void setData​(String fname,
                            CacheableData<?> data)
        Set the data for the ReadCacheEntry with specified filename.
        fname - the filename of the read data
        data - the CacheableData object for setting the ReadCacheEntry
      • setInvalid

        public void setInvalid​(String fname)
        Set the ReadCacheEntry of a given filename to invalid. Usually done after a failing read attempt so that the threads waiting for the data can continue.
        fname - the filename of the read data