Package org.apache.ignite.internal
Interface IgniteEx
-
- All Superinterfaces:
AutoCloseable,Ignite
- All Known Implementing Classes:
IgniteKernal
public interface IgniteEx extends Ignite
Extended Grid interface which provides some additional methods required for kernal and Visor.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanallEventsUserRecordable(int[] types)Checks whether all provided events are user-recordable.Collection<IgniteInternalCache<?,?>>cachesx(@Nullable IgnitePredicate<? super IgniteInternalCache<?,?>>... p)Gets configured cache instance that satisfy all provided predicates including non-public caches.<K,V>
@Nullable IgniteInternalCache<K,V>cachex(String name)Gets the cache instance for the given name if one is configured or null otherwise returning even non-public caches.IgniteClusterExcluster()Gets an instance ofIgniteClusterinterface.IgniteCommandRegistrycommandsRegistry()GridKernalContextcontext()Internal context.booleandestroyCache0(String cacheName, boolean sql)Stops dynamically started cache.booleaneventUserRecordable(int type)Checks if the event type is user-recordable.<K,V>
IgniteBiTuple<IgniteCache<K,V>,Boolean>getOrCreateCache0(CacheConfiguration<K,V> cacheCfg, boolean sql)Gets existing cache with the given name or creates new one with the given configuration.booleanisJmxRemoteEnabled()Whether or not remote JMX management is enabled for this node.booleanisRebalanceEnabled()Get rebalance enabled flag.booleanisRestartEnabled()Whether or not node restart is enabled.@Nullable StringlatestVersion()Get latest version in string form.ClusterNodelocalNode()Gets local grid node.voidrebalanceEnabled(boolean rebalanceEnabled)Set rebalance enable flag on node.<T> IgniteSet<T>set(String name, int cacheId, boolean collocated, boolean separated)Gets a set from cache by known cache id.<K extends GridCacheUtilityKey,V>
IgniteInternalCache<K,V>utilityCache()Gets utility cache.-
Methods inherited from interface org.apache.ignite.Ignite
active, active, addCacheConfiguration, affinity, atomicLong, atomicLong, atomicReference, atomicReference, atomicSequence, atomicSequence, atomicStamped, atomicStamped, binary, cache, cacheNames, close, compute, compute, configuration, countDownLatch, createCache, createCache, createCache, createCaches, createNearCache, dataRegionMetrics, dataRegionMetrics, dataStreamer, destroyCache, destroyCaches, encryption, events, events, executorService, executorService, getOrCreateCache, getOrCreateCache, getOrCreateCache, getOrCreateCaches, getOrCreateNearCache, log, memoryMetrics, memoryMetrics, message, message, metrics, name, plugin, queue, reentrantLock, resetLostPartitions, scheduler, semaphore, services, services, set, snapshot, tracingConfiguration, transactions, version
-
-
-
-
Method Detail
-
utilityCache
<K extends GridCacheUtilityKey,V> IgniteInternalCache<K,V> utilityCache()
Gets utility cache.- Returns:
- Utility cache.
-
cachex
@Nullable <K,V> @Nullable IgniteInternalCache<K,V> cachex(String name)
Gets the cache instance for the given name if one is configured or null otherwise returning even non-public caches.- Type Parameters:
K- Key type.V- Value type.- Parameters:
name- Cache name.- Returns:
- Cache instance for given name or null if one does not exist.
-
cachesx
Collection<IgniteInternalCache<?,?>> cachesx(@Nullable @Nullable IgnitePredicate<? super IgniteInternalCache<?,?>>... p)
Gets configured cache instance that satisfy all provided predicates including non-public caches. If no predicates provided - all configured caches will be returned.- Parameters:
p- Predicates. If none provided - all configured caches will be returned.- Returns:
- Configured cache instances that satisfy all provided predicates.
-
getOrCreateCache0
<K,V> IgniteBiTuple<IgniteCache<K,V>,Boolean> getOrCreateCache0(CacheConfiguration<K,V> cacheCfg, boolean sql) throws javax.cache.CacheException
Gets existing cache with the given name or creates new one with the given configuration.If a cache with the same name already exists, this method will not check that the given configuration matches the configuration of existing cache and will return an instance of the existing cache.
- Parameters:
cacheCfg- Cache configuration to use.sql-trueif this call is triggered by SQL commandCREATE TABLE,falseotherwise.- Returns:
- Tuple [Existing or newly created cache;
trueif cache was newly crated,falseotherwise] - Throws:
javax.cache.CacheException- If error occurs.
-
destroyCache0
boolean destroyCache0(String cacheName, boolean sql) throws javax.cache.CacheException
Stops dynamically started cache.- Parameters:
cacheName- Cache name to stop.sql-trueif only cache created with SQL commandCREATE TABLEshould be affected,falseotherwise.- Returns:
trueif cache has been stopped as the result of this call,falseotherwise.- Throws:
javax.cache.CacheException- If error occurs.
-
eventUserRecordable
boolean eventUserRecordable(int type)
Checks if the event type is user-recordable.- Parameters:
type- Event type to check.- Returns:
trueif passed event should be recorded,false- otherwise.
-
allEventsUserRecordable
boolean allEventsUserRecordable(int[] types)
Checks whether all provided events are user-recordable.Note that this method supports only predefined Ignite events.
- Parameters:
types- Event types.- Returns:
- Whether all events are recordable.
- Throws:
IllegalArgumentException- Iftypescontains user event type.
-
isJmxRemoteEnabled
boolean isJmxRemoteEnabled()
Whether or not remote JMX management is enabled for this node.- Returns:
Trueif remote JMX management is enabled -falseotherwise.
-
isRestartEnabled
boolean isRestartEnabled()
Whether or not node restart is enabled.- Returns:
Trueif restart mode is enabled,falseotherwise.
-
cluster
IgniteClusterEx cluster()
Gets an instance ofIgniteClusterinterface.- Specified by:
clusterin interfaceIgnite- Returns:
- Instance of
IgniteClusterinterface.
-
latestVersion
@Nullable @Nullable String latestVersion()
Get latest version in string form.- Returns:
- Latest version.
-
localNode
ClusterNode localNode()
Gets local grid node.- Returns:
- Local grid node.
-
context
GridKernalContext context()
Internal context.- Returns:
- Kernal context.
-
isRebalanceEnabled
boolean isRebalanceEnabled()
Get rebalance enabled flag.- Returns:
Trueif rebalance enabled on node,Falseotherwise.
-
rebalanceEnabled
void rebalanceEnabled(boolean rebalanceEnabled)
Set rebalance enable flag on node.- Parameters:
rebalanceEnabled- rebalance enabled flag.
-
set
<T> IgniteSet<T> set(String name, int cacheId, boolean collocated, boolean separated) throws IgniteException
Gets a set from cache by known cache id. Does not create new sets.- Type Parameters:
T- Type of the elements in set.- Parameters:
name- Set name.cacheId- Cache id.collocated- Colocated mode flag.separated- Separated cache flag.- Returns:
- Set with given properties.
- Throws:
IgniteException- If set could not be fetched or created.
-
commandsRegistry
IgniteCommandRegistry commandsRegistry()
- Returns:
- Registry with all management commands known by node.
- See Also:
Command
-
-