public class GridCachePreloaderAdapter<K,V> extends Object implements GridCachePreloader<K,V>
| Modifier and Type | Field and Description |
|---|---|
protected CacheAffinityFunction |
aff
Affinity.
|
protected GridCacheContext<K,V> |
cctx
Cache context.
|
protected IgniteLogger |
log
Logger.
|
protected IgnitePredicate<GridCacheEntryInfo> |
preloadPred
Preload predicate.
|
| Constructor and Description |
|---|
GridCachePreloaderAdapter(GridCacheContext<K,V> cctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAssignments(GridDhtPreloaderAssignments<K,V> assignments,
boolean forcePreload)
Adds assignments to preloader.
|
GridDhtPreloaderAssignments<K,V> |
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.
|
IgnitePredicate<GridCacheEntryInfo> |
preloadPredicate() |
void |
preloadPredicate(IgnitePredicate<GridCacheEntryInfo> preloadPred) |
IgniteInternalFuture<Object> |
request(Collection<KeyCacheObject> keys,
long 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<K,V> cctx
protected final IgniteLogger log
protected final CacheAffinityFunction aff
protected IgnitePredicate<GridCacheEntryInfo> preloadPred
public GridCachePreloaderAdapter(GridCacheContext<K,V> cctx)
cctx - Cache context.public void start()
throws IgniteCheckedException
start in interface GridCachePreloader<K,V>IgniteCheckedException - If start failed.public void stop()
stop in interface GridCachePreloader<K,V>public void onKernalStart()
throws IgniteCheckedException
onKernalStart in interface GridCachePreloader<K,V>IgniteCheckedException - If failed.public void onKernalStop()
onKernalStop in interface GridCachePreloader<K,V>public void forcePreload()
forcePreload in interface GridCachePreloader<K,V>public void preloadPredicate(IgnitePredicate<GridCacheEntryInfo> preloadPred)
preloadPredicate in interface GridCachePreloader<K,V>preloadPred - Preload predicate.public IgnitePredicate<GridCacheEntryInfo> preloadPredicate()
preloadPredicate in interface GridCachePreloader<K,V>null, 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 GridCachePreloader<K,V>public IgniteInternalFuture<?> syncFuture()
syncFuture in interface GridCachePreloader<K,V>public void unwindUndeploys()
unwindUndeploys in interface GridCachePreloader<K,V>public IgniteInternalFuture<Object> request(Collection<KeyCacheObject> keys, long topVer)
request in interface GridCachePreloader<K,V>keys - Keys to request.topVer - Topology version, -1 if not required.public void onInitialExchangeComplete(@Nullable Throwable err)
onInitialExchangeComplete in interface GridCachePreloader<K,V>err - Error, if any happened on initial exchange.public void onExchangeFutureAdded()
onExchangeFutureAdded in interface GridCachePreloader<K,V>public void updateLastExchangeFuture(GridDhtPartitionsExchangeFuture lastFut)
GridCachePreloaderupdateLastExchangeFuture in interface GridCachePreloader<K,V>lastFut - Last future.public GridDhtPreloaderAssignments<K,V> assign(GridDhtPartitionsExchangeFuture exchFut)
assign in interface GridCachePreloader<K,V>exchFut - Exchange future to assign.public void addAssignments(GridDhtPreloaderAssignments<K,V> assignments, boolean forcePreload)
addAssignments in interface GridCachePreloader<K,V>assignments - Assignments to add.forcePreload - Force preload flag.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0-RC3 Release Date : March 24 2015