public class GridCachePreloaderAdapter<K,V> extends Object implements GridCachePreloader<K,V>
| Modifier and Type | Field and Description |
|---|---|
protected GridCacheAffinityFunction |
aff
Affinity.
|
protected GridCacheContext<K,V> |
cctx
Cache context.
|
protected GridLogger |
log
Logger.
|
protected GridPredicate<GridCacheEntryInfo<K,V>> |
preloadPred
Preload predicate.
|
| Constructor and Description |
|---|
GridCachePreloaderAdapter(GridCacheContext<K,V> cctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
forcePreload()
Force preload process.
|
void |
onKernalStart()
Kernal start callback.
|
void |
onKernalStop()
Kernal stop callback.
|
GridPredicate<GridCacheEntryInfo<K,V>> |
preloadPredicate() |
void |
preloadPredicate(GridPredicate<GridCacheEntryInfo<K,V>> preloadPred) |
GridFuture<Object> |
request(Collection<? extends K> keys,
long topVer)
Requests that preloader sends the request for the key.
|
void |
start()
Starts preloading.
|
GridFuture<?> |
startFuture() |
void |
stop()
Stops preloading.
|
GridFuture<?> |
syncFuture() |
void |
unwindUndeploys()
Unwinds undeploys.
|
protected final GridCacheContext<K,V> cctx
protected final GridLogger log
protected final GridCacheAffinityFunction aff
protected GridPredicate<GridCacheEntryInfo<K,V>> preloadPred
public GridCachePreloaderAdapter(GridCacheContext<K,V> cctx)
cctx - Cache context.public void start()
throws GridException
start in interface GridCachePreloader<K,V>GridException - If start failed.public void stop()
stop in interface GridCachePreloader<K,V>public void onKernalStart()
throws GridException
onKernalStart in interface GridCachePreloader<K,V>GridException - If failed.public void onKernalStop()
onKernalStop in interface GridCachePreloader<K,V>public void forcePreload()
forcePreload in interface GridCachePreloader<K,V>public void preloadPredicate(GridPredicate<GridCacheEntryInfo<K,V>> preloadPred)
preloadPredicate in interface GridCachePreloader<K,V>preloadPred - Preload predicate.public GridPredicate<GridCacheEntryInfo<K,V>> 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 GridFuture<?> startFuture()
startFuture in interface GridCachePreloader<K,V>public GridFuture<?> syncFuture()
syncFuture in interface GridCachePreloader<K,V>public void unwindUndeploys()
unwindUndeploys in interface GridCachePreloader<K,V>public GridFuture<Object> request(Collection<? extends K> keys, long topVer)
request in interface GridCachePreloader<K,V>keys - Keys to request.topVer - Topology version, -1 if not required.Copyright © 2014. All rights reserved.