Class FederatedReadCache
java.lang.Object
org.apache.sysds.runtime.controlprogram.federated.FederatedReadCache
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass representing an entry of the federated read cache. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the data from the ReadCacheEntry corresponding to the specified filename, if the data from this filename has already been read.voidsetData(String fname, CacheableData<?> data) Set the data for the ReadCacheEntry with specified filename.voidsetInvalid(String fname) Set the ReadCacheEntry of a given filename to invalid.
-
Constructor Details
-
FederatedReadCache
public FederatedReadCache()
-
-
Method Details
-
get
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.- Parameters:
fname- the filename of the read dataputPlaceholder- whether to put a placeholder if there is no mapping for the filename- Returns:
- the CacheableData object if it is cached, otherwise null
-
setData
Set the data for the ReadCacheEntry with specified filename.- Parameters:
fname- the filename of the read datadata- the CacheableData object for setting the ReadCacheEntry
-
setInvalid
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.- Parameters:
fname- the filename of the read data
-