public class GridCachePreloaderAdapter extends Object implements GridCachePreloader
| Modifier and Type | Field and Description |
|---|---|
protected AffinityFunction |
aff
Affinity.
|
protected GridCacheContext<?,?> |
cctx
Cache context.
|
protected IgniteLogger |
log
Logger.
|
protected IgnitePredicate<GridCacheEntryInfo> |
preloadPred
Preload predicate.
|
| Constructor and Description |
|---|
GridCachePreloaderAdapter(GridCacheContext<?,?> cctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAssignments(GridDhtPreloaderAssignments assignments,
boolean forcePreload)
Adds assignments to preloader.
|
GridDhtPreloaderAssignments |
assign(GridDhtPartitionsExchangeFuture exchFut) |
void |
forcePreload()
Force preload process.
|
void |
onExchangeFutureAdded()
Callback by exchange manager when new exchange future is added to worker.
|
void |
onInitialExchangeComplete(Throwable err)
Callback by exchange manager when initial partition exchange is complete.
|
void |
onKernalStart()
Kernal start callback.
|
void |
onKernalStop()
Kernal stop callback.
|
void |
onReconnected()
Client reconnected callback.
|
IgnitePredicate<GridCacheEntryInfo> |
preloadPredicate() |
void |
preloadPredicate(IgnitePredicate<GridCacheEntryInfo> preloadPred) |
IgniteInternalFuture<Object> |
request(Collection<KeyCacheObject> keys,
AffinityTopologyVersion topVer)
Requests that preloader sends the request for the key.
|
void |
start()
Starts preloading.
|
IgniteInternalFuture<Object> |
startFuture() |
void |
stop()
Stops preloading.
|
IgniteInternalFuture<?> |
syncFuture() |
void |
unwindUndeploys()
Unwinds undeploys.
|
void |
updateLastExchangeFuture(GridDhtPartitionsExchangeFuture lastFut)
Updates last exchange future.
|
protected final GridCacheContext<?,?> cctx
protected final IgniteLogger log
protected final AffinityFunction aff
protected IgnitePredicate<GridCacheEntryInfo> preloadPred
public GridCachePreloaderAdapter(GridCacheContext<?,?> cctx)
cctx - Cache context.public void start()
throws IgniteCheckedException
start in interface GridCachePreloaderIgniteCheckedException - If start failed.public void stop()
stop in interface GridCachePreloaderpublic void onKernalStart()
throws IgniteCheckedException
onKernalStart in interface GridCachePreloaderIgniteCheckedException - If failed.public void onKernalStop()
onKernalStop in interface GridCachePreloaderpublic void forcePreload()
forcePreload in interface GridCachePreloaderpublic void onReconnected()
onReconnected in interface GridCachePreloaderpublic void preloadPredicate(IgnitePredicate<GridCacheEntryInfo> preloadPred)
preloadPredicate in interface GridCachePreloaderpreloadPred - Preload predicate.public IgnitePredicate<GridCacheEntryInfo> preloadPredicate()
preloadPredicate in interface GridCachePreloadernull, will evaluate each preloaded entry during
send and receive, and if predicate evaluates to false, entry will be skipped.public IgniteInternalFuture<Object> startFuture()
startFuture in interface GridCachePreloaderpublic IgniteInternalFuture<?> syncFuture()
syncFuture in interface GridCachePreloaderpublic void unwindUndeploys()
unwindUndeploys in interface GridCachePreloaderpublic IgniteInternalFuture<Object> request(Collection<KeyCacheObject> keys, AffinityTopologyVersion topVer)
request in interface GridCachePreloaderkeys - Keys to request.topVer - Topology version, -1 if not required.public void onInitialExchangeComplete(@Nullable Throwable err)
onInitialExchangeComplete in interface GridCachePreloadererr - Error, if any happened on initial exchange.public void onExchangeFutureAdded()
onExchangeFutureAdded in interface GridCachePreloaderpublic void updateLastExchangeFuture(GridDhtPartitionsExchangeFuture lastFut)
updateLastExchangeFuture in interface GridCachePreloaderlastFut - Last future.public GridDhtPreloaderAssignments assign(GridDhtPartitionsExchangeFuture exchFut)
assign in interface GridCachePreloaderexchFut - Exchange future to assign.public void addAssignments(GridDhtPreloaderAssignments assignments, boolean forcePreload)
addAssignments in interface GridCachePreloaderassignments - Assignments to add.forcePreload - Force preload flag.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.4.0 Release Date : September 24 2015