public interface GridOffHeapPartitionedMap
Modifier and Type | Method and Description |
---|---|
long |
allocatedSize()
Gets size of a memory allocated for map entries so far.
|
int |
concurrency()
Gets concurrency level for this map.
|
boolean |
contains(int p,
int hash,
byte[] keyBytes)
Checks if given key is contained in the map.
|
void |
destruct()
Destructs this map and deallocates all memory.
|
void |
enableEviction(int p,
int hash,
byte[] keyBytes)
Enables eviction for entry.
|
boolean |
eventListener(GridOffHeapEventListener lsnr)
Adds off-heap event listener.
|
boolean |
evictListener(GridOffHeapEvictListener lsnr)
Sets callback for when entries are evicted due to memory constraints.
|
long |
freeSize()
Gets available memory.
|
byte[] |
get(int p,
int hash,
byte[] keyBytes)
Gets value bytes for given key.
|
void |
insert(int p,
int hash,
byte[] keyBytes,
byte[] valBytes)
Inserts new entry into the map without comparing if there is
a mapping for given key already stored in map.
|
GridCloseableIterator<IgniteBiTuple<byte[],byte[]>> |
iterator()
Gets iterator over the whole map.
|
<T> GridCloseableIterator<T> |
iterator(CX2<T2<Long,Integer>,T2<Long,Integer>,T> c)
Gets iterator over the whole map.
|
<T> GridCloseableIterator<T> |
iterator(CX2<T2<Long,Integer>,T2<Long,Integer>,T> c,
int part)
Gets iterator over the partition.
|
GridCloseableIterator<IgniteBiTuple<byte[],byte[]>> |
iterator(int p)
Gets iterator over certain partition.
|
float |
loadFactor()
Gets load factor of this map.
|
long |
memorySize()
Gets total available memory size.
|
int |
partitions()
Gets number of partitions.
|
boolean |
put(int p,
int hash,
byte[] keyBytes,
byte[] valBytes)
Puts key and value bytes into the map potentially replacing
existing entry.
|
byte[] |
remove(int p,
int hash,
byte[] keyBytes)
Removes value from off-heap map.
|
boolean |
removex(int p,
int hash,
byte[] keyBytes)
Removes value from off-heap map without returning it.
|
boolean |
removex(int part,
int hash,
byte[] keyBytes,
IgniteBiPredicate<Long,Integer> p)
Removes value from off-heap map without returning it.
|
long |
size()
Gets number of elements in the map.
|
long |
size(Set<Integer> parts)
Gets number of elements in the map.
|
long |
systemAllocatedSize()
Gets memory allocated for map internal structure so far.
|
IgniteBiTuple<Long,Integer> |
valuePointer(int p,
int hash,
byte[] keyBytes)
Gets value pointer for given key.
|
float loadFactor()
int concurrency()
int partitions()
boolean contains(int p, int hash, byte[] keyBytes)
p
- Partition.hash
- Hash.keyBytes
- Key bytes.True
if key is contained in the map.@Nullable byte[] get(int p, int hash, byte[] keyBytes)
p
- Partition.hash
- Hash.keyBytes
- Key bytes.@Nullable IgniteBiTuple<Long,Integer> valuePointer(int p, int hash, byte[] keyBytes)
put(int, int, byte[], byte[])
or
enableEviction(int, int, byte[])
is called.p
- Partition.hash
- Hash.keyBytes
- Key bytes.void enableEviction(int p, int hash, byte[] keyBytes)
p
- Partition.hash
- Hash.keyBytes
- Key bytes.@Nullable byte[] remove(int p, int hash, byte[] keyBytes)
p
- Partition.hash
- Hash.keyBytes
- Key bytes.boolean removex(int p, int hash, byte[] keyBytes)
p
- Partition.hash
- Hash.keyBytes
- Key bytes.True
if value was removed.boolean removex(int part, int hash, byte[] keyBytes, IgniteBiPredicate<Long,Integer> p)
part
- Partition.hash
- Hash.keyBytes
- Key bytes.p
- Value predicate (arguments are value address and value length).True
if value was removed.boolean put(int p, int hash, byte[] keyBytes, byte[] valBytes)
p
- Partition.hash
- Hash.keyBytes
- Key bytes.valBytes
- Value bytes.True
if new entry was created, false
if existing value was updated.void insert(int p, int hash, byte[] keyBytes, byte[] valBytes)
Use with caution whenever certain that inserting a new value without current mapping.
p
- Partition.hash
- Hash.keyBytes
- Key bytes.valBytes
- Value bytes.long size()
long size(Set<Integer> parts)
parts
- Partitions.long memorySize()
long allocatedSize()
long systemAllocatedSize()
long freeSize()
void destruct()
GridCloseableIterator<IgniteBiTuple<byte[],byte[]>> iterator()
<T> GridCloseableIterator<T> iterator(CX2<T2<Long,Integer>,T2<Long,Integer>,T> c)
c
- Key/value closure.<T> GridCloseableIterator<T> iterator(CX2<T2<Long,Integer>,T2<Long,Integer>,T> c, int part)
c
- Key/value closure.part
- Partition.GridCloseableIterator<IgniteBiTuple<byte[],byte[]>> iterator(int p)
p
- Partition.boolean evictListener(GridOffHeapEvictListener lsnr)
lsnr
- Evict listener.True
if evict listener was added, false
if
another listener already exists or LRU
is disabled.boolean eventListener(GridOffHeapEventListener lsnr)
lsnr
- Listener.True
if event listener was added, false
if
another listener already exists.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017