| Modifier and Type | Field and Description |
|---|---|
protected boolean |
closeEngine |
protected boolean |
counter |
protected DB |
db |
protected Engine[] |
engines |
protected ScheduledExecutorService |
executor |
protected long |
executorPeriod |
protected long |
expire |
protected long |
expireAccess |
protected long |
expireMaxSize |
protected long |
expireStoreSize |
protected long |
expireTick |
protected Serializer<?> |
keySerializer |
protected String |
name |
protected Bind.MapWithModificationListener |
ondisk |
protected boolean |
ondiskOverwrite |
protected boolean |
pumpIgnoreDuplicates |
protected Fun.Function1 |
pumpKeyExtractor |
protected int |
pumpPresortBatchSize |
protected Iterator |
pumpSource |
protected Fun.Function1 |
pumpValueExtractor |
protected Fun.Function1<?,?> |
valueCreator |
protected Serializer<?> |
valueSerializer |
| Constructor and Description |
|---|
DB.HTreeMapMaker(DB db,
String name,
Engine[] engines) |
| Modifier and Type | Method and Description |
|---|---|
protected DB.HTreeMapMaker |
closeEngine() |
DB.HTreeMapMaker |
counterEnable()
by default collection does not have counter, without counter updates are faster, but entire collection needs to be traversed to count items.
|
DB.HTreeMapMaker |
executorEnable() |
DB.HTreeMapMaker |
executorEnable(ScheduledExecutorService executor) |
DB.HTreeMapMaker |
executorPeriod(long period) |
DB.HTreeMapMaker |
expireAfterAccess(long interval)
Specifies that each entry should be automatically removed from the map once a fixed duration has elapsed after the entry's creation, the most recent replacement of its value, or its last access.
|
DB.HTreeMapMaker |
expireAfterAccess(long interval,
TimeUnit timeUnit)
Specifies that each entry should be automatically removed from the map once a fixed duration has elapsed after the entry's creation, the most recent replacement of its value, or its last access.
|
DB.HTreeMapMaker |
expireAfterWrite(long interval)
Specifies that each entry should be automatically removed from the map once a fixed duration has elapsed after the entry's creation, or the most recent replacement of its value.
|
DB.HTreeMapMaker |
expireAfterWrite(long interval,
TimeUnit timeUnit)
Specifies that each entry should be automatically removed from the map once a fixed duration has elapsed after the entry's creation, or the most recent replacement of its value.
|
DB.HTreeMapMaker |
expireMaxSize(long maxSize)
maximal number of entries in this map.
|
DB.HTreeMapMaker |
expireOverflow(Bind.MapWithModificationListener ondisk,
boolean overwrite)
After expiration (or deletion), put entries into given map
|
DB.HTreeMapMaker |
expireStoreSize(double maxStoreSize)
maximal size of store in GB, if store is larger entries will start expiring
|
DB.HTreeMapMaker |
expireTick(long expireTick)
Calling expiration cleanup too often reduces performance.
|
DB.HTreeMapMaker |
keySerializer(Serializer<?> keySerializer)
keySerializer used to convert keys into/from binary form.
|
<K,V> HTreeMap<K,V> |
make() |
<K,V> HTreeMap<K,V> |
makeOrGet() |
<K> DB.HTreeMapMaker |
pumpIgnoreDuplicates()
If source iteretor contains an duplicate key, exception is thrown.
|
DB.HTreeMapMaker |
pumpPresort(int batchSize) |
<K,V> DB.HTreeMapMaker |
pumpSource(Iterator<Fun.Pair<K,V>> entriesSource) |
<K,V> DB.HTreeMapMaker |
pumpSource(Iterator<K> keysSource,
Fun.Function1<V,K> valueExtractor) |
DB.HTreeMapMaker |
valueCreator(Fun.Function1<?,?> valueCreator)
If value is not found, HTreeMap can fetch and insert default value.
|
DB.HTreeMapMaker |
valueSerializer(Serializer<?> valueSerializer)
valueSerializer used to convert values into/from binary form.
|
protected final DB db
protected final String name
protected final Engine[] engines
protected boolean counter
protected Serializer<?> keySerializer
protected Serializer<?> valueSerializer
protected long expireMaxSize
protected long expire
protected long expireAccess
protected long expireStoreSize
protected long expireTick
protected Bind.MapWithModificationListener ondisk
protected boolean ondiskOverwrite
protected Fun.Function1<?,?> valueCreator
protected Iterator pumpSource
protected Fun.Function1 pumpKeyExtractor
protected Fun.Function1 pumpValueExtractor
protected int pumpPresortBatchSize
protected boolean pumpIgnoreDuplicates
protected boolean closeEngine
protected ScheduledExecutorService executor
protected long executorPeriod
public DB.HTreeMapMaker counterEnable()
public DB.HTreeMapMaker keySerializer(Serializer<?> keySerializer)
public DB.HTreeMapMaker valueSerializer(Serializer<?> valueSerializer)
public DB.HTreeMapMaker expireMaxSize(long maxSize)
public DB.HTreeMapMaker expireTick(long expireTick)
expireTick - minimal time between expiration cleanup in millisecondspublic DB.HTreeMapMaker expireAfterWrite(long interval, TimeUnit timeUnit)
public DB.HTreeMapMaker expireAfterWrite(long interval)
public DB.HTreeMapMaker expireAfterAccess(long interval, TimeUnit timeUnit)
public DB.HTreeMapMaker expireAfterAccess(long interval)
public DB.HTreeMapMaker expireStoreSize(double maxStoreSize)
public DB.HTreeMapMaker expireOverflow(Bind.MapWithModificationListener ondisk, boolean overwrite)
ondisk - Map populated with data after expirationoverwrite - if true any data in onDisk will be overwritten.
If false only non-existing keys will be inserted
(put() versus putIfAbsent();public DB.HTreeMapMaker valueCreator(Fun.Function1<?,?> valueCreator)
valueCreator is used to return new value.
This way HTreeMap.get() never returns nullpublic <K,V> DB.HTreeMapMaker pumpSource(Iterator<K> keysSource, Fun.Function1<V,K> valueExtractor)
public <K,V> DB.HTreeMapMaker pumpSource(Iterator<Fun.Pair<K,V>> entriesSource)
public DB.HTreeMapMaker pumpPresort(int batchSize)
public DB.HTreeMapMaker executorEnable()
public DB.HTreeMapMaker executorEnable(ScheduledExecutorService executor)
public DB.HTreeMapMaker executorPeriod(long period)
public <K> DB.HTreeMapMaker pumpIgnoreDuplicates()
protected DB.HTreeMapMaker closeEngine()
public <K,V> HTreeMap<K,V> make()
public <K,V> HTreeMap<K,V> makeOrGet()
Copyright © 2015. All Rights Reserved.