| Modifier and Type | Method and Description |
|---|---|
void |
applyFunction(K key,
K functionId)
Executes the registered function for this map.
|
Map<K,V> |
asJava()
Returns the java map of this map.
|
void |
clear()
Clears this map.
|
swaydb.data.accelerate.Level0Meter |
commit(swaydb.Prepare<K,V>... prepares)
Starts the commit function for this map.
|
boolean |
containsKey(K key)
Checks if a map contains key.
|
boolean |
containsValue(V value)
Checks if a map contains value.
|
Set<Map.Entry<K,V>> |
entrySet()
Returns the entrues for this map.
|
LocalDateTime |
expiration(K key)
Returns the expiration date for key in this map.
|
V |
expire(K key,
LocalDateTime expireAt)
Setups the expiration at for key to this map.
|
V |
expire(K key,
long after,
TimeUnit timeUnit)
Setups the expiration after for key to this map.
|
void |
foreach(Consumer<Map.Entry<K,V>> consumer)
Starts the foreach function for this map.
|
Map<K,V> |
from(K key)
Returns the map object which starts from key for this map.
|
Map<K,V> |
fromOrAfter(K key)
Returns the map object which starts or after key for this map.
|
Map<K,V> |
fromOrBefore(K key)
Returns the map object which starts or before key for this map.
|
V |
get(K key)
Returns the value or null for key of this map.
|
Map.Entry<K,V> |
head()
Returns the head key for this map.
|
Optional<Map.Entry<K,V>> |
headOption()
Returns the optional head key for this map.
|
boolean |
isEmpty()
Checks the map is empty.
|
swaydb.Set<K> |
keys()
Returns the key objects for this map.
|
Set<K> |
keySet()
Returns the key set for this map.
|
K |
keysHead()
Returns the head key for this map.
|
Optional<K> |
keysHeadOption()
Returns the optional head key for this map.
|
int |
keySize(K key)
Returns the key size in bytes for this map.
|
K |
keysLast()
Returns the last key for this map.
|
Optional<K> |
keysLastOption()
Returns the optional last key for this map.
|
Map.Entry<K,V> |
last()
Returns the last key for this map.
|
Optional<Map.Entry<K,V>> |
lastOption()
Returns the optional last key for this map.
|
swaydb.data.accelerate.Level0Meter |
level0Meter()
Returns the level of meter for zerro level.
|
Optional<swaydb.data.compaction.LevelMeter> |
levelMeter(int levelNumber)
Returns the level of meter for level.
|
boolean |
mightContain(K key)
Checks if a map might contain key.
|
boolean |
nonEmpty()
Checks the map is not empty.
|
V |
put(K key,
V value)
Puts the key/value pair for this map.
|
V |
put(K key,
V value,
LocalDateTime expireAt)
Puts the key/value pair for this map with expiration at data.
|
V |
put(K key,
V value,
long expireAfter,
TimeUnit timeUnit)
Puts the key/value pair for this map with expiration after data.
|
void |
put(Map.Entry<K,V> entry)
Puts an entry object to this map.
|
void |
put(Map<K,V> map)
Puts a map object to this map.
|
K |
registerFunction(K functionId,
Function<V,swaydb.Apply.Map<V>> function)
Registers the function for this map.
|
V |
remove(K key)
Removes the value for key of this map.
|
void |
remove(K from,
K to)
Removes the values for keys of this map.
|
void |
remove(Set<K> keys)
Removes the values for key set of this map.
|
int |
size()
Returns the size of elements in this map.
|
long |
sizeOfSegments()
Returns the size for segments for this map.
|
Duration |
timeLeft(K key)
Returns the time left for key in this map.
|
V |
update(K key,
V value)
Updates the key/value for this map.
|
void |
update(Map<K,V> map)
Updates map entries for this map.
|
List<V> |
values()
Returns the values for this map.
|
int |
valueSize(V value)
Returns the value size in bytes for this map.
|
int size()
boolean isEmpty()
true if a map is empty, false otherwiseboolean nonEmpty()
true if a map is not empty, false otherwiseLocalDateTime expiration(K key)
key - the keyDuration timeLeft(K key)
key - the keyint keySize(K key)
key - the keyint valueSize(V value)
value - the valuelong sizeOfSegments()
swaydb.data.accelerate.Level0Meter level0Meter()
Optional<swaydb.data.compaction.LevelMeter> levelMeter(int levelNumber)
levelNumber - the level numberboolean containsKey(K key)
key - the keytrue if a map contains key, false otherwiseboolean mightContain(K key)
key - the keytrue if a map might contains key, false otherwiseOptional<Map.Entry<K,V>> headOption()
Optional<Map.Entry<K,V>> lastOption()
boolean containsValue(V value)
value - the valuetrue if a map contains value, false otherwisevoid clear()
K keysHead()
Optional<K> keysHeadOption()
K keysLast()
Optional<K> keysLastOption()
Set<Map.Entry<K,V>> entrySet()
V put(K key, V value)
key - the keyvalue - the valueV put(K key, V value, long expireAfter, TimeUnit timeUnit)
key - the keyvalue - the valueexpireAfter - the expireAftertimeUnit - the timeUnitV put(K key, V value, LocalDateTime expireAt)
key - the keyvalue - the valueexpireAt - the expireAtV expire(K key, long after, TimeUnit timeUnit)
key - the keyafter - the aftertimeUnit - the timeUnitV expire(K key, LocalDateTime expireAt)
key - the keyexpireAt - the expireAtV update(K key, V value)
key - the keyvalue - the valueV get(K key)
key - the keyV remove(K key)
key - the keyvoid remove(Set<K> keys)
keys - the keysvoid remove(K from, K to)
from - the fromto - the toK registerFunction(K functionId, Function<V,swaydb.Apply.Map<V>> function)
functionId - the functionIdfunction - the functionvoid applyFunction(K key, K functionId)
key - the keyfunctionId - the functionIdMap<K,V> from(K key)
key - the keyMap<K,V> fromOrAfter(K key)
key - the keyMap<K,V> fromOrBefore(K key)
key - the keyswaydb.Set<K> keys()
void foreach(Consumer<Map.Entry<K,V>> consumer)
consumer - the consumerCopyright © 2019. All rights reserved.