org.terracotta.offheapstore
Interface Segment<K,V>
- All Superinterfaces:
- ConcurrentMap<K,V>, Map<K,V>, MapInternals, ReadWriteLock
- All Known Subinterfaces:
- PinnableSegment<K,V>
- All Known Implementing Classes:
- AbstractLockedOffHeapHashMap, AbstractOffHeapClockCache, AbstractPersistentLockedOffHeapHashMap, AbstractPersistentOffHeapCache, EvictionListeningReadWriteLockedOffHeapClockCache, EvictionListeningWriteLockedOffHeapClockCache, PersistentReadWriteLockedOffHeapClockCache, PersistentReadWriteLockedOffHeapHashMap, ReadWriteLockedOffHeapClockCache, ReadWriteLockedOffHeapHashMap, WriteLockedOffHeapClockCache, WriteLockedOffHeapHashMap
public interface Segment<K,V>
- extends ConcurrentMap<K,V>, MapInternals, ReadWriteLock
Implemented by maps that can be used as segments in a concurrent map.
- Author:
- Chris Dennis
- See Also:
AbstractConcurrentOffHeapMap
| Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
|
Method Summary |
void |
destroy()
|
V |
fill(K key,
V value)
See OffHeapHashMap.fill(Object, Object) for a detailed description. |
V |
fill(K key,
V value,
int metadata)
|
V |
getAndSetMetadata(K key,
int mask,
int metadata)
|
ReentrantReadWriteLock |
getLock()
Return the ReentrantReadWriteLock used by this segment. |
V |
put(K key,
V value,
int metadata)
|
boolean |
removeNoReturn(Object key)
|
boolean |
setMetadata(K key,
int mask,
int metadata)
|
boolean |
shrink()
|
| Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from interface org.terracotta.offheapstore.MapInternals |
getAllocatedMemory, getDataAllocatedMemory, getDataOccupiedMemory, getDataSize, getDataVitalMemory, getOccupiedMemory, getRemovedSlotCount, getReprobeLength, getSize, getTableCapacity, getUsedSlotCount, getVitalMemory |
fill
V fill(K key,
V value)
- See
OffHeapHashMap.fill(Object, Object) for a detailed description.
- Parameters:
key - key with which the specified value is to be associatedvalue - value to be associated with the specified key
- Returns:
- the previous value associated with key, or
null if there was no mapping for key
(irrespective of whether the value was successfully installed).
fill
V fill(K key,
V value,
int metadata)
put
V put(K key,
V value,
int metadata)
setMetadata
boolean setMetadata(K key,
int mask,
int metadata)
getAndSetMetadata
V getAndSetMetadata(K key,
int mask,
int metadata)
getLock
ReentrantReadWriteLock getLock()
throws UnsupportedOperationException
- Return the
ReentrantReadWriteLock used by this segment.
- Returns:
- RRWL for this segment
- Throws:
UnsupportedOperationException - if this segment does not use a RRWL
removeNoReturn
boolean removeNoReturn(Object key)
destroy
void destroy()
shrink
boolean shrink()
Copyright © 2015. All Rights Reserved.