| Modifier and Type | Class and Description |
|---|---|
private static class |
PersistentMapCache.MapWaliRecord |
private static class |
PersistentMapCache.Serde |
| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
logger |
private AtomicLong |
modifications |
private WriteAheadRepository<PersistentMapCache.MapWaliRecord> |
wali |
private MapCache |
wrapped |
| Constructor and Description |
|---|
PersistentMapCache(String serviceIdentifier,
File persistencePath,
MapCache cacheToWrap) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(ByteBuffer key) |
MapCacheRecord |
fetch(ByteBuffer key) |
ByteBuffer |
get(ByteBuffer key) |
Set<ByteBuffer> |
keySet() |
MapPutResult |
put(ByteBuffer key,
ByteBuffer value) |
MapPutResult |
putIfAbsent(ByteBuffer key,
ByteBuffer value) |
protected void |
putWriteAheadLog(ByteBuffer key,
ByteBuffer value,
MapPutResult putResult) |
ByteBuffer |
remove(ByteBuffer key) |
Map<ByteBuffer,ByteBuffer> |
removeByPattern(String regex) |
MapPutResult |
replace(MapCacheRecord record) |
(package private) void |
restore() |
void |
shutdown() |
Map<ByteBuffer,ByteBuffer> |
subMap(List<ByteBuffer> keys) |
private static final org.slf4j.Logger logger
private final MapCache wrapped
private final WriteAheadRepository<PersistentMapCache.MapWaliRecord> wali
private final AtomicLong modifications
public PersistentMapCache(String serviceIdentifier, File persistencePath, MapCache cacheToWrap) throws IOException
IOExceptionvoid restore()
throws IOException
IOExceptionpublic MapPutResult putIfAbsent(ByteBuffer key, ByteBuffer value) throws IOException
putIfAbsent in interface MapCacheIOExceptionpublic MapPutResult put(ByteBuffer key, ByteBuffer value) throws IOException
put in interface MapCacheIOExceptionprotected void putWriteAheadLog(ByteBuffer key, ByteBuffer value, MapPutResult putResult) throws IOException
IOExceptionpublic boolean containsKey(ByteBuffer key) throws IOException
containsKey in interface MapCacheIOExceptionpublic ByteBuffer get(ByteBuffer key) throws IOException
get in interface MapCacheIOExceptionpublic Map<ByteBuffer,ByteBuffer> subMap(List<ByteBuffer> keys) throws IOException
subMap in interface MapCacheIOExceptionpublic MapCacheRecord fetch(ByteBuffer key) throws IOException
fetch in interface MapCacheIOExceptionpublic MapPutResult replace(MapCacheRecord record) throws IOException
replace in interface MapCacheIOExceptionpublic ByteBuffer remove(ByteBuffer key) throws IOException
remove in interface MapCacheIOExceptionpublic Map<ByteBuffer,ByteBuffer> removeByPattern(String regex) throws IOException
removeByPattern in interface MapCacheIOExceptionpublic Set<ByteBuffer> keySet() throws IOException
keySet in interface MapCacheIOExceptionpublic void shutdown()
throws IOException
shutdown in interface MapCacheIOExceptionCopyright © 2021 Apache NiFi Project. All rights reserved.