public class GridDhtPartitionsReservation extends Object implements GridReservable
| Constructor and Description |
|---|
GridDhtPartitionsReservation(AffinityTopologyVersion topVer,
GridCacheContext<?,?> cctx,
Object appKey) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
invalidate()
If returns
true this reservation object becomes invalid and partitions
can be evicted or at least cleared. |
void |
onPublish(CI1<GridDhtPartitionsReservation> unpublish)
Must be called when this reservation is published.
|
boolean |
register(Collection<? extends GridReservable> parts)
Registers all the given partitions for this reservation.
|
void |
release()
Releases all the registered partitions.
|
boolean |
reserve()
Reserves all the registered partitions.
|
String |
toString() |
public GridDhtPartitionsReservation(AffinityTopologyVersion topVer, GridCacheContext<?,?> cctx, Object appKey)
topVer - AffinityTopologyVersion version.cctx - Cache context.appKey - Application key for reservation.public boolean register(Collection<? extends GridReservable> parts)
parts - Partitions.true If registration succeeded and this reservation can be published.public void onPublish(CI1<GridDhtPartitionsReservation> unpublish)
unpublish - Closure to unpublish this reservation when it will become invalid.public boolean reserve()
reserve in interface GridReservabletrue If succeeded.public void release()
release in interface GridReservablepublic boolean invalidate()
true this reservation object becomes invalid and partitions
can be evicted or at least cleared.
Also this means that after returning true here method reserve() can not
return true anymore.true If this reservation was successfully invalidated because it was not
reserved and partitions can be evicted.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.15.0 Release Date : April 25 2023