Class ClusterCachesInfo


  • public class ClusterCachesInfo
    extends Object
    Logic related to cache discovery data processing.
    • Constructor Detail

      • ClusterCachesInfo

        public ClusterCachesInfo​(GridKernalContext ctx)
        Parameters:
        ctx - Context.
    • Method Detail

      • filterDynamicCacheDescriptors

        public void filterDynamicCacheDescriptors​(Set<String> localCachesOnStart)
        Filters all dynamic cache descriptors and groups that were not presented on node start and were received with grid discovery data.
        Parameters:
        localCachesOnStart - Caches which were already presented on node start.
      • onKernalStart

        public void onKernalStart​(boolean checkConsistency)
                           throws IgniteCheckedException
        Parameters:
        checkConsistency - True if need check cache configurations consistency.
        Throws:
        IgniteCheckedException - If failed.
      • onCacheChangeRequested

        public void onCacheChangeRequested​(DynamicCacheChangeFailureMessage failMsg,
                                           AffinityTopologyVersion topVer)
        Creates exchanges actions. Forms a list of caches and cache groups to be stopped due to dynamic cache start failure.
        Parameters:
        failMsg - Dynamic change request fail message.
        topVer - Current topology version.
      • onCacheChangeRequested

        public boolean onCacheChangeRequested​(DynamicCacheChangeBatch batch,
                                              AffinityTopologyVersion topVer)
        Parameters:
        batch - Cache change request.
        topVer - Current topology version.
        Returns:
        True if minor topology version should be increased.
      • localJoinCachesContext

        @Nullable
        public @Nullable LocalJoinCachesContext localJoinCachesContext()
        Called from exchange worker.
        Returns:
        Caches to be started when this node starts.
      • onDiscoveryEvent

        public void onDiscoveryEvent​(int type,
                                     ClusterNode node,
                                     AffinityTopologyVersion topVer)
        Discovery event callback, executed from discovery thread.
        Parameters:
        type - Event type.
        node - Event node.
        topVer - Topology version.
      • cleanupRemovedCaches

        public void cleanupRemovedCaches​(AffinityTopologyVersion topVer)
        Cleanups cache descriptors that belong to the topVer and earlier.
        Parameters:
        topVer - Topology version.
      • cleanupRemovedCacheGroups

        public void cleanupRemovedCacheGroups​(AffinityTopologyVersion topVer)
        Cleanups cache group descriptors that belong to the topVer and earlier.
        Parameters:
        topVer - Topology version.
      • markedForDeletionCacheGroupDesc

        @Nullable
        public @Nullable CacheGroupDescriptor markedForDeletionCacheGroupDesc​(int grpId)
        Parameters:
        grpId - Group id.
      • markedForDeletionCache

        @Nullable
        public @Nullable DynamicCacheDescriptor markedForDeletionCache​(String cacheName)
        Parameters:
        cacheName - Cache name.
      • validateJoiningNodeData

        public String validateJoiningNodeData​(DiscoveryDataBag.JoiningNodeDiscoveryData data,
                                              boolean joiningNodeClient)
        Parameters:
        data - Joining node data.
        joiningNodeClient - Joining node is client flag.
        Returns:
        Message with error or null if everything was OK.
      • isMergeConfigSupports

        public boolean isMergeConfigSupports​(ClusterNode joiningNode)
        Returns:
        true if grid supports merge of config and False otherwise.
      • onDisconnected

        public void onDisconnected()
      • onReconnected

        public org.apache.ignite.internal.processors.cache.ClusterCachesReconnectResult onReconnected​(boolean active,
                                                                                                      boolean transition)
        Parameters:
        active - True if reconnected to active cluster.
        transition - True if reconnected while state transition in progress.
        Returns:
        Information about stopped caches and cache groups.
      • isRestarting

        public boolean isRestarting​(String cacheName)
        Parameters:
        cacheName - Cache name.
        Returns:
        True if cache is restarting.
      • removeRestartingCache

        public void removeRestartingCache​(String cacheName)
        Parameters:
        cacheName - Cache name which restart were cancelled.
      • removeRestartingCaches

        public void removeRestartingCaches()
        Clear up information about restarting caches.