public class GridCacheProcessor extends GridProcessorAdapter
GridComponent.DiscoveryDataExchangeTypectx, log| Constructor and Description |
|---|
GridCacheProcessor(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
<K,V> GridCache<K,V> |
atomicsCache()
Gets utility cache for atomic data structures.
|
void |
blockGateway(DynamicCacheChangeRequest req) |
void |
blockGateways()
Blocks all available gateways
|
<K,V> GridCache<K,V> |
cache() |
<K,V> GridCache<K,V> |
cache(String name) |
CacheMode |
cacheMode(String cacheName)
Gets cache mode.
|
Collection<String> |
cacheNames()
Gets a collection of currentlty started caches.
|
Collection<GridCache<?,?>> |
caches() |
void |
cancelUserOperations()
Cancel all user operations.
|
Object |
collectDiscoveryData(UUID nodeId)
Gets discovery data object that will be sent to new node
during discovery process.
|
void |
completeStartFuture(DynamicCacheChangeRequest req) |
<K,V> GridCacheSharedContext<K,V> |
context() |
GridComponent.DiscoveryDataExchangeType |
discoveryDataType()
Gets unique component type to distinguish components providing discovery data.
|
boolean |
dynamicCacheRegistered(DynamicCacheChangeRequest req) |
IgniteInternalFuture<?> |
dynamicStartCache(CacheConfiguration ccfg,
String cacheName,
NearCacheConfiguration nearCfg,
boolean failIfExists)
Dynamically starts cache.
|
IgniteInternalFuture<?> |
dynamicStopCache(String cacheName) |
Collection<org.apache.ignite.internal.processors.cache.GridCacheProcessor.DynamicCacheStartFuture> |
initiateCacheChanges(Collection<DynamicCacheChangeRequest> reqs) |
<K,V> GridCacheAdapter<K,V> |
internalCache() |
<K,V> GridCacheAdapter<K,V> |
internalCache(String name) |
Collection<GridCacheAdapter<?,?>> |
internalCaches() |
<K,V> IgniteCacheProxy<K,V> |
jcache(String name) |
long |
lastDataVersion() |
GridCacheAdapter<Integer,String> |
marshallerCache() |
void |
onDiscoveryDataReceived(UUID joiningNodeId,
UUID rmtNodeId,
Object data)
Receives discovery data object from remote nodes (called
on new node during discovery process).
|
void |
onEvictFromSwap(String spaceName,
byte[] keyBytes,
byte[] valBytes) |
void |
onExchangeDone(AffinityTopologyVersion topVer,
Collection<DynamicCacheChangeRequest> reqs,
Throwable err)
Callback invoked when first exchange future for dynamic cache is completed.
|
void |
onKernalStart()
Callback that notifies that kernal has successfully started,
including all managers and processors.
|
void |
onKernalStop(boolean cancel)
Callback to notify that kernal is about to stop.
|
void |
onUndeployed(ClassLoader ldr)
Callback invoked by deployment manager for whenever a class loader
gets undeployed.
|
IgniteInternalFuture<?> |
orderedPreloadFuture(int order)
Gets preload finish future for preload-ordered cache with given order.
|
void |
prepareCachesStart(Collection<DynamicCacheChangeRequest> reqs,
AffinityTopologyVersion topVer) |
void |
prepareCacheStop(DynamicCacheChangeRequest req) |
void |
printMemoryStats()
Prints memory statistics (sizes of internal structures, etc.).
|
<K,V> GridCache<K,V> |
publicCache() |
<K,V> GridCache<K,V> |
publicCache(String name) |
Collection<IgniteCacheProxy<?,?>> |
publicCaches() |
<K,V> IgniteCache<K,V> |
publicJCache(String cacheName) |
void |
start()
Starts grid component.
|
void |
stop(boolean cancel)
Stops grid component.
|
boolean |
systemCache(String name) |
IgniteTransactionsEx |
transactions() |
<K,V> GridCacheAdapter<K,V> |
utilityCache()
Gets utility cache.
|
<K extends GridCacheUtilityKey,V> |
utilityCache(Class<K> keyCls,
Class<V> valCls)
Gets utility cache.
|
IgniteSpiNodeValidationResult |
validateNode(ClusterNode node)
Validates that new node can join grid topology, this method is called on coordinator
node before new node joins topology.
|
assertParameter, toStringpublic GridCacheProcessor(GridKernalContext ctx)
ctx - Kernal context.public void start()
throws IgniteCheckedException
start in interface GridComponentstart in class GridProcessorAdapterIgniteCheckedException - Throws in case of any errors.public void onKernalStart()
throws IgniteCheckedException
onKernalStart in interface GridComponentonKernalStart in class GridProcessorAdapterIgniteCheckedException - Thrown in case of any errors.public void stop(boolean cancel)
throws IgniteCheckedException
stop in interface GridComponentstop in class GridProcessorAdaptercancel - If true, then all ongoing tasks or jobs for relevant
components need to be cancelled.IgniteCheckedException - Thrown in case of any errors.public void blockGateways()
public void onKernalStop(boolean cancel)
onKernalStop in interface GridComponentonKernalStop in class GridProcessorAdaptercancel - Flag indicating whether jobs should be canceled.public Collection<String> cacheNames()
public CacheMode cacheMode(String cacheName)
cacheName - Cache name to check.public boolean dynamicCacheRegistered(DynamicCacheChangeRequest req)
req - Request to check.True if change request was registered to apply.public void prepareCachesStart(Collection<DynamicCacheChangeRequest> reqs, AffinityTopologyVersion topVer) throws IgniteCheckedException
reqs - Requests to start.IgniteCheckedException - If failed to start cache.public void blockGateway(DynamicCacheChangeRequest req)
req - Stop request.public void prepareCacheStop(DynamicCacheChangeRequest req)
req - Stop request.public void onExchangeDone(AffinityTopologyVersion topVer, Collection<DynamicCacheChangeRequest> reqs, Throwable err)
topVer - Completed topology version.reqs - Change requests.public void completeStartFuture(DynamicCacheChangeRequest req)
req - Request to complete future for.@Nullable public GridComponent.DiscoveryDataExchangeType discoveryDataType()
GridComponent.collectDiscoveryData(UUID).discoveryDataType in interface GridComponentdiscoveryDataType in class GridProcessorAdapter@Nullable public Object collectDiscoveryData(UUID nodeId)
collectDiscoveryData in interface GridComponentcollectDiscoveryData in class GridProcessorAdapternodeId - ID of new node that joins topology.null if there is nothing
to send for this component.public void onDiscoveryDataReceived(UUID joiningNodeId, UUID rmtNodeId, Object data)
onDiscoveryDataReceived in interface GridComponentonDiscoveryDataReceived in class GridProcessorAdapterjoiningNodeId - Joining node ID.rmtNodeId - Remote node ID for which data is provided.data - Discovery data object or null if nothing waspublic IgniteInternalFuture<?> dynamicStartCache(@Nullable CacheConfiguration ccfg, String cacheName, @Nullable NearCacheConfiguration nearCfg, boolean failIfExists)
ccfg - Cache configuration.public IgniteInternalFuture<?> dynamicStopCache(String cacheName)
cacheName - Cache name to stop.public Collection<org.apache.ignite.internal.processors.cache.GridCacheProcessor.DynamicCacheStartFuture> initiateCacheChanges(Collection<DynamicCacheChangeRequest> reqs)
reqs - Requests.@Nullable public IgniteSpiNodeValidationResult validateNode(ClusterNode node)
validateNode in interface GridComponentvalidateNode in class GridProcessorAdapternode - Joining node.null in case of success.@Nullable public IgniteInternalFuture<?> orderedPreloadFuture(int order)
order.order - Cache order.null if order is minimal order found.public void onEvictFromSwap(String spaceName, byte[] keyBytes, byte[] valBytes)
spaceName - Space name.keyBytes - Key bytes.valBytes - Value bytes.public long lastDataVersion()
public <K,V> GridCache<K,V> cache()
K - type of keys.V - type of values.public <K,V> GridCache<K,V> cache(@Nullable String name)
K - type of keys.V - type of values.name - Cache name.public Collection<GridCache<?,?>> caches()
public <K,V> GridCache<K,V> publicCache()
K - type of keys.V - type of values.public GridCacheAdapter<Integer,String> marshallerCache()
public <K extends GridCacheUtilityKey,V> GridCacheProjectionEx<K,V> utilityCache(Class<K> keyCls, Class<V> valCls)
keyCls - Key class.valCls - Value class.public <K,V> GridCacheAdapter<K,V> utilityCache()
public <K,V> GridCache<K,V> atomicsCache()
public <K,V> GridCache<K,V> publicCache(@Nullable String name)
K - type of keys.V - type of values.name - Cache name.public <K,V> IgniteCache<K,V> publicJCache(@Nullable String cacheName)
K - type of keys.V - type of values.cacheName - Cache name.public <K,V> IgniteCacheProxy<K,V> jcache(@Nullable String name)
name - Cache name.public Collection<IgniteCacheProxy<?,?>> publicCaches()
public <K,V> GridCacheAdapter<K,V> internalCache()
K - type of keys.V - type of values.public <K,V> GridCacheAdapter<K,V> internalCache(@Nullable String name)
K - type of keys.V - type of values.name - Cache name.public void cancelUserOperations()
public Collection<GridCacheAdapter<?,?>> internalCaches()
public boolean systemCache(@Nullable String name)
name - Cache name.True if specified cache is system, false otherwise.public void printMemoryStats()
printMemoryStats in interface GridComponentprintMemoryStats in class GridProcessorAdapterpublic void onUndeployed(ClassLoader ldr)
ldr - Class loader.public <K,V> GridCacheSharedContext<K,V> context()
public IgniteTransactionsEx transactions()
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0 Release Date : March 31 2015