public interface WritableStringMetadataCache extends ReadOnlyStringMetadataCache
Modifier and Type | Method and Description |
---|---|
Set<Map.Entry<String,org.apache.storm.metricstore.rocksdb.StringMetadata>> |
entrySet()
Get the map of the cache contents.
|
void |
put(String s,
org.apache.storm.metricstore.rocksdb.StringMetadata stringMetadata,
boolean newEntry)
Add the string metadata to the cache.
|
contains, get, getMetadataString
void put(String s, org.apache.storm.metricstore.rocksdb.StringMetadata stringMetadata, boolean newEntry) throws MetricException
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.
s
- The string to addstringMetadata
- The string's metadatanewEntry
- Indicates the metadata is being used for the first time and should be written to RocksDB immediatelyMetricException
- when evicted data fails to save to the database or when the database is shutdownCopyright © 2023 The Apache Software Foundation. All rights reserved.