Class OHazelcastClusterMetadataManager

java.lang.Object
com.orientechnologies.orient.server.hazelcast.OHazelcastClusterMetadataManager
All Implemented Interfaces:
com.hazelcast.core.EntryListener<String,Object>, com.hazelcast.core.LifecycleListener, com.hazelcast.core.MembershipListener, com.hazelcast.map.listener.EntryAddedListener<String,Object>, com.hazelcast.map.listener.EntryEvictedListener<String,Object>, com.hazelcast.map.listener.EntryRemovedListener<String,Object>, com.hazelcast.map.listener.EntryUpdatedListener<String,Object>, com.hazelcast.map.listener.MapClearedListener, com.hazelcast.map.listener.MapEvictedListener, com.hazelcast.map.listener.MapListener, EventListener

public class OHazelcastClusterMetadataManager extends Object implements com.hazelcast.core.MembershipListener, com.hazelcast.core.EntryListener<String,Object>, com.hazelcast.core.LifecycleListener
  • Field Details

    • CONFIG_NODE_PREFIX

      public static final String CONFIG_NODE_PREFIX
      See Also:
    • hazelcastConfigFile

      protected String hazelcastConfigFile
    • hazelcastConfig

      protected com.hazelcast.config.Config hazelcastConfig
    • membershipListenerRegistration

      protected String membershipListenerRegistration
    • membershipListenerMapRegistration

      protected String membershipListenerMapRegistration
    • hazelcastInstance

      protected volatile com.hazelcast.core.HazelcastInstance hazelcastInstance
    • configurationMap

      protected OHazelcastDistributedMap configurationMap
    • activeNodes

      protected ConcurrentMap<String,com.hazelcast.core.Member> activeNodes
    • activeNodesNamesByUuid

      protected ConcurrentMap<String,String> activeNodesNamesByUuid
    • activeNodesUuidByName

      protected ConcurrentMap<String,String> activeNodesUuidByName
    • registeredNodeByName

      protected final ConcurrentMap<String,Integer> registeredNodeByName
    • publishLocalNodeConfigurationTask

      protected OCancellableTimer publishLocalNodeConfigurationTask
    • status

      protected volatile NODE_STATUS status
    • lastClusterChangeOn

      protected long lastClusterChangeOn
  • Constructor Details

    • OHazelcastClusterMetadataManager

      public OHazelcastClusterMetadataManager(ODistributedPlugin distributedPlugin)
  • Method Details

    • configHazelcastPlugin

      public void configHazelcastPlugin(OServer server, OServerParameterConfiguration[] params, String nodeName) throws FileNotFoundException
      Throws:
      FileNotFoundException
    • getHazelcastConfig

      public com.hazelcast.config.Config getHazelcastConfig()
    • startupHazelcastPlugin

      public void startupHazelcastPlugin() throws IOException, InterruptedException
      Throws:
      IOException
      InterruptedException
    • publishLocalNodeConfiguration

      protected void publishLocalNodeConfiguration()
    • prepareHazelcastPluginShutdown

      public void prepareHazelcastPluginShutdown()
    • hazelcastPluginShutdown

      public void hazelcastPluginShutdown()
    • getClusterMemberByName

      public com.hazelcast.core.Member getClusterMemberByName(String rNodeName)
    • getHazelcastInstance

      public com.hazelcast.core.HazelcastInstance getHazelcastInstance()
    • configureHazelcast

      protected com.hazelcast.core.HazelcastInstance configureHazelcast() throws FileNotFoundException
      Throws:
      FileNotFoundException
    • getConfigurationMap

      public OHazelcastDistributedMap getConfigurationMap()
    • memberAttributeChanged

      public void memberAttributeChanged(com.hazelcast.core.MemberAttributeEvent memberAttributeEvent)
      Specified by:
      memberAttributeChanged in interface com.hazelcast.core.MembershipListener
    • entryAdded

      public void entryAdded(com.hazelcast.core.EntryEvent<String,Object> iEvent)
      Specified by:
      entryAdded in interface com.hazelcast.map.listener.EntryAddedListener<String,Object>
    • entryUpdated

      public void entryUpdated(com.hazelcast.core.EntryEvent<String,Object> iEvent)
      Specified by:
      entryUpdated in interface com.hazelcast.map.listener.EntryUpdatedListener<String,Object>
    • entryRemoved

      public void entryRemoved(com.hazelcast.core.EntryEvent<String,Object> iEvent)
      Specified by:
      entryRemoved in interface com.hazelcast.map.listener.EntryRemovedListener<String,Object>
    • entryEvicted

      public void entryEvicted(com.hazelcast.core.EntryEvent<String,Object> iEvent)
      Specified by:
      entryEvicted in interface com.hazelcast.map.listener.EntryEvictedListener<String,Object>
    • mapEvicted

      public void mapEvicted(com.hazelcast.core.MapEvent iEvent)
      Specified by:
      mapEvicted in interface com.hazelcast.map.listener.MapEvictedListener
    • mapCleared

      public void mapCleared(com.hazelcast.core.MapEvent event)
      Specified by:
      mapCleared in interface com.hazelcast.map.listener.MapClearedListener
    • memberRemoved

      public void memberRemoved(com.hazelcast.core.MembershipEvent iEvent)
      Removes the node map entry.
      Specified by:
      memberRemoved in interface com.hazelcast.core.MembershipListener
    • memberAdded

      public void memberAdded(com.hazelcast.core.MembershipEvent iEvent)
      Specified by:
      memberAdded in interface com.hazelcast.core.MembershipListener
    • stateChanged

      public void stateChanged(com.hazelcast.core.LifecycleEvent event)
      Specified by:
      stateChanged in interface com.hazelcast.core.LifecycleListener
    • getNodeConfigurationByUuid

      public ONodeConfig getNodeConfigurationByUuid(String iNodeId, boolean useCache)
    • getNodeConfigurationByName

      public ONodeConfig getNodeConfigurationByName(String nodeName, boolean useCache)
    • removeFromLocalActiveServerList

      public com.hazelcast.core.Member removeFromLocalActiveServerList(String nodeLeftName)
    • getActiveServers

      public Set<String> getActiveServers()
    • registerNode

      protected void registerNode(com.hazelcast.core.Member member, String joinedNodeName)
    • getNodeName

      public String getNodeName(com.hazelcast.core.Member iMember, boolean useCache)
    • getClusterConfiguration

      public OClusterConfiguration getClusterConfiguration()
    • getNodeUuidByName

      public String getNodeUuidByName(String name)
    • getDatabaseConfiguration

      public ODistributedConfiguration getDatabaseConfiguration(String iDatabaseName)
    • getDatabaseConfiguration

      public ODistributedConfiguration getDatabaseConfiguration(String iDatabaseName, boolean createIfNotPresent)
    • updateLastClusterChange

      public void updateLastClusterChange()
    • getLastClusterChangeOn

      public long getLastClusterChangeOn()