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 Detail

      • 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 - true if this call is triggered by SQL command CREATE TABLE, false otherwise.
        Returns:
        Tuple [Existing or newly created cache; true if cache was newly crated, false otherwise]
        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 - true if only cache created with SQL command CREATE TABLE should be affected, false otherwise.
        Returns:
        true if cache has been stopped as the result of this call, false otherwise.
        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:
        true if 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 - If types contains user event type.
      • isJmxRemoteEnabled

        boolean isJmxRemoteEnabled()
        Whether or not remote JMX management is enabled for this node.
        Returns:
        True if remote JMX management is enabled - false otherwise.
      • isRestartEnabled

        boolean isRestartEnabled()
        Whether or not node restart is enabled.
        Returns:
        True if restart mode is enabled, false otherwise.
      • 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.
      • isRebalanceEnabled

        boolean isRebalanceEnabled()
        Get rebalance enabled flag.
        Returns:
        True if rebalance enabled on node, False otherwise.
      • 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