public class GridDhtLocalPartition extends Object implements Comparable<GridDhtLocalPartition>, GridReservable, GridCacheConcurrentMap
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_DELETE_QUEUE_SIZE
Maximum size for delete queue.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addReservation(GridDhtPartitionsReservation r)
Adds group reservation to this partition.
|
Iterable<GridCacheMapEntry> |
allEntries(CacheEntryPredicate... filter) |
boolean |
backup(AffinityTopologyVersion topVer) |
int |
compareTo(GridDhtLocalPartition part) |
void |
decrementPublicSize(GridCacheEntryEx e)
Decrements public size.
|
Iterable<GridCacheMapEntry> |
entries(CacheEntryPredicate... filter) |
Set<GridCacheMapEntry> |
entrySet(CacheEntryPredicate... filter) |
boolean |
equals(Object obj) |
GridCacheMapEntry |
getEntry(KeyCacheObject key)
Returns the entry associated with the specified key in the
HashMap.
|
int |
hashCode() |
int |
id() |
void |
incrementPublicSize(GridCacheEntryEx e)
Increments public size.
|
boolean |
isEmpty() |
Set<KeyCacheObject> |
keySet() |
Set<KeyCacheObject> |
keySet(CacheEntryPredicate... filter) |
void |
lock()
Locks partition.
|
long |
nextUpdateCounter() |
void |
onDeferredDelete(KeyCacheObject key,
GridCacheVersion ver) |
void |
onEntryEvicted(KeyCacheObject key,
GridCacheVersion ver) |
boolean |
preloadingPermitted(KeyCacheObject key,
GridCacheVersion ver)
Cache preloader should call this method within partition lock.
|
boolean |
primary(AffinityTopologyVersion topVer) |
int |
publicSize()
Returns the number of publicly available key-value mappings in this map.
|
GridCacheMapEntry |
putEntryIfObsoleteOrAbsent(AffinityTopologyVersion topVer,
KeyCacheObject key,
CacheObject val,
boolean create,
boolean touch) |
GridCacheMapEntry |
randomEntry() |
void |
release()
Releases previously reserved partition.
|
boolean |
removeEntry(GridCacheEntryEx entry)
Removes passed in entry if it presents in the map.
|
void |
removeReservation(GridDhtPartitionsReservation r) |
int |
reservations() |
boolean |
reserve()
Reserves a partition so it won't be cleared.
|
int |
size()
Returns the number of key-value mappings in this map.
|
GridDhtPartitionState |
state() |
String |
toString() |
void |
tryEvict() |
void |
unlock()
Unlocks partition.
|
long |
updateCounter() |
void |
updateCounter(long val) |
boolean |
valid() |
public static final int MAX_DELETE_QUEUE_SIZE
public boolean addReservation(GridDhtPartitionsReservation r)
r - Reservation.false If such reservation already added.public void removeReservation(GridDhtPartitionsReservation r)
r - Reservation.public int id()
public GridDhtPartitionState state()
public int reservations()
public Set<KeyCacheObject> keySet()
public boolean isEmpty()
True if partition is empty.public int size()
size in interface GridCacheConcurrentMappublic int publicSize()
publicSize in interface GridCacheConcurrentMappublic void incrementPublicSize(GridCacheEntryEx e)
incrementPublicSize in interface GridCacheConcurrentMape - Entry that caused public size change.public void decrementPublicSize(GridCacheEntryEx e)
decrementPublicSize in interface GridCacheConcurrentMape - Entry that caused public size change.public boolean valid()
@Nullable public GridCacheMapEntry getEntry(KeyCacheObject key)
getEntry in interface GridCacheConcurrentMapkey - Key.public boolean removeEntry(GridCacheEntryEx entry)
removeEntry in interface GridCacheConcurrentMapentry - Entry to remove.True if remove happened.public Iterable<GridCacheMapEntry> entries(CacheEntryPredicate... filter)
entries in interface GridCacheConcurrentMapfilter - Filter.public Iterable<GridCacheMapEntry> allEntries(CacheEntryPredicate... filter)
allEntries in interface GridCacheConcurrentMapfilter - Filter.public Set<GridCacheMapEntry> entrySet(CacheEntryPredicate... filter)
entrySet in interface GridCacheConcurrentMapfilter - Filter.@Nullable public GridCacheMapEntry randomEntry()
randomEntry in interface GridCacheConcurrentMappublic GridCacheMapEntry putEntryIfObsoleteOrAbsent(AffinityTopologyVersion topVer, KeyCacheObject key, @Nullable CacheObject val, boolean create, boolean touch)
putEntryIfObsoleteOrAbsent in interface GridCacheConcurrentMaptopVer - Topology version.key - Key.val - Value.create - Create flag.public Set<KeyCacheObject> keySet(CacheEntryPredicate... filter)
keySet in interface GridCacheConcurrentMappublic void onDeferredDelete(KeyCacheObject key, GridCacheVersion ver) throws IgniteCheckedException
key - Removed key.ver - Removed version.IgniteCheckedException - If failed.public void lock()
public void unlock()
public void onEntryEvicted(KeyCacheObject key, GridCacheVersion ver)
key - Key.ver - Version.public boolean preloadingPermitted(KeyCacheObject key, GridCacheVersion ver)
key - Key.ver - Version.True if preloading is permitted.public boolean reserve()
reserve in interface GridReservableTrue if reserved.public void release()
release in interface GridReservablepublic void tryEvict()
public boolean primary(AffinityTopologyVersion topVer)
topVer - Topology version.True if local node is primary for this partition.public boolean backup(AffinityTopologyVersion topVer)
topVer - Topology version.True if local node is backup for this partition.public long nextUpdateCounter()
public long updateCounter()
public void updateCounter(long val)
val - Update index value.public int compareTo(@NotNull GridDhtLocalPartition part)
compareTo in interface Comparable<GridDhtLocalPartition>
Follow @ApacheIgnite
Ignite Fabric : ver. 1.6.0 Release Date : May 18 2016