Interface WritableStringMetadataCache
- All Superinterfaces:
- ReadOnlyStringMetadataCache
- All Known Implementing Classes:
- StringMetadataCache
The writable interface to a StringMetadataCache intended to be used by a single RocksDBMetricwWriter instance.
 This class is not thread safe.
- 
Method SummaryModifier and TypeMethodDescriptionentrySet()Get the map of the cache contents.voidAdd the string metadata to the cache.Methods inherited from interface org.apache.storm.metricstore.rocksdb.ReadOnlyStringMetadataCachecontains, get, getMetadataString
- 
Method Details- 
putvoid put(String s, org.apache.storm.metricstore.rocksdb.StringMetadata stringMetadata, boolean newEntry) throws MetricException Add the string metadata to the cache.NOTE: this can cause data to be evicted from the cache when full. When this occurs, the evictionCallback() method is called to store the metadata back into the RocksDB database. This method is only exposed to the WritableStringMetadataCache interface. - Parameters:
- s- The string to add
- stringMetadata- The string's metadata
- newEntry- Indicates the metadata is being used for the first time and should be written to RocksDB immediately
- Throws:
- MetricException- when evicted data fails to save to the database or when the database is shutdown
 
- 
entrySetGet the map of the cache contents. Provided to allow writing the data to RocksDB on shutdown.- Returns:
- the string metadata map entrySet
 
 
-