public class GridDhtLocalPartition extends Object implements Comparable<GridDhtLocalPartition>, GridReservable
| 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.
|
int |
compareTo(GridDhtLocalPartition part) |
void |
decrementPublicSize()
Decrements public size of the map.
|
Collection<GridDhtCacheEntry> |
entries() |
boolean |
equals(Object obj) |
int |
hashCode() |
int |
id() |
void |
incrementPublicSize()
Increments public size of the map.
|
boolean |
isEmpty() |
Set<KeyCacheObject> |
keySet() |
void |
lock()
Locks partition.
|
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() |
void |
release()
Releases previously reserved partition.
|
void |
removeReservation(GridDhtPartitionsReservation r) |
int |
reservations() |
boolean |
reserve()
Reserves a partition so it won't be cleared.
|
int |
size() |
GridDhtPartitionState |
state() |
String |
toString() |
void |
unlock()
Unlocks partition.
|
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 Collection<GridDhtCacheEntry> entries()
public boolean isEmpty()
True if partition is empty.public int size()
public void incrementPublicSize()
public void decrementPublicSize()
public int publicSize()
public boolean valid()
public 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 boolean primary(AffinityTopologyVersion topVer)
topVer - Topology version.True if local node is primary for this partition.public int compareTo(@NotNull GridDhtLocalPartition part)
compareTo in interface Comparable<GridDhtLocalPartition>
Follow @ApacheIgnite
Ignite Fabric : ver. 1.4.0 Release Date : September 24 2015