public class ExpandableBufferCache extends Object
Inspired by agrona's LongLruCache.
| Constructor and Description |
|---|
ExpandableBufferCache(int cacheCapacity,
int initialBufferCapacity,
java.util.function.LongFunction<org.agrona.DirectBuffer> lookup)
Create a new cache.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
org.agrona.DirectBuffer |
get(long key) |
int |
getSize() |
void |
put(long key,
org.agrona.DirectBuffer buffer) |
void |
remove(long key) |
public ExpandableBufferCache(int cacheCapacity,
int initialBufferCapacity,
java.util.function.LongFunction<org.agrona.DirectBuffer> lookup)
cacheCapacity - capacity of the cacheinitialBufferCapacity - initial capacity of the underlying expandable bufferslookup - a function for lookup an absent valueCopyright © 2017–2019 camunda services GmbH. All rights reserved.