Interface CoordinatorRegistryCenter

All Superinterfaces:
RegistryCenter

public interface CoordinatorRegistryCenter extends RegistryCenter
Coordinator registry center.
  • Method Details

    • getDirectly

      String getDirectly(String key)
      Get value from registry center directly.
      Parameters:
      key - key
      Returns:
      value
    • getChildrenKeys

      List<String> getChildrenKeys(String key)
      Get children keys.
      Parameters:
      key - key
      Returns:
      children keys
    • getNumChildren

      int getNumChildren(String key)
      Get children number.
      Parameters:
      key - key
      Returns:
      children number
    • persistEphemeral

      void persistEphemeral(String key, String value)
      Persist ephemeral data.
      Parameters:
      key - key
      value - value
    • persistSequential

      String persistSequential(String key, String value)
      Persist sequential data.
      Parameters:
      key - key
      value - value
      Returns:
      value which include 10 digital
    • persistEphemeralSequential

      void persistEphemeralSequential(String key)
      Persist ephemeral sequential data.
      Parameters:
      key - key
    • addCacheData

      void addCacheData(String cachePath)
      Add data to cache.
      Parameters:
      cachePath - cache path
    • evictCacheData

      void evictCacheData(String cachePath)
      Evict data from cache.
      Parameters:
      cachePath - cache path
    • getRawCache

      Object getRawCache(String cachePath)
      Get raw cache object of registry center.
      Parameters:
      cachePath - cache path
      Returns:
      raw cache object of registry center
    • executeInLeader

      void executeInLeader(String key, LeaderExecutionCallback callback)
      Execute in leader.
      Parameters:
      key - key
      callback - callback of leader
    • watch

      void watch(String key, DataChangedEventListener listener, Executor executor)
      Watch changes of a key.
      Parameters:
      key - key to be watched
      listener - data listener
      executor - event notify executor
    • addConnectionStateChangedEventListener

      void addConnectionStateChangedEventListener(ConnectionStateChangedEventListener listener)
      Add connection state changed event listener to registry center.
      Parameters:
      listener - connection state changed event listener
    • executeInTransaction

      void executeInTransaction(List<TransactionOperation> transactionOperations) throws Exception
      Execute oprations in transaction.
      Parameters:
      transactionOperations - operations
      Throws:
      Exception - exception