Interface IRegistrationService

All Known Implementing Classes:
RegistrationService

public interface IRegistrationService
This service provides an API that deals with Node registration
  • Method Details

    • registerPullOnlyNode

      Node registerPullOnlyNode(String externalId, String nodeGroupId, String databaseType, String databaseVersion, String databseName) throws IOException
      Register a "Pull Only" node. This type of node has no Symmetric configuration and can only be used to PULL data from another node. It can never track changes or push data to other nodes. When a node of this type is registered, it must complete all symmetric client functionality by itself including issue the pull, acknowledging batches, etc.
      Parameters:
      externalId -
      nodeGroupId -
      databaseType -
      databaseVersion -
      Throws:
      IOException
    • registerNode

      boolean registerNode(Node node, String remoteHost, String remoteAddress, OutputStream out, String userId, String password, boolean isRequestedRegistration) throws IOException
      Register a node for the given group name and external id if the registration is open.
      Parameters:
      isRequestedRegistration - An indicator that registration has been requested by the remote client
      Throws:
      IOException
    • registerNode

      boolean registerNode(Node node, OutputStream out, boolean isRequestedRegistration) throws IOException
      Register a node for the given group name and external id if the registration is open.
      Parameters:
      isRequestedRegistration - An indicator that registration has been requested by the remote client
      Throws:
      IOException
    • openRegistration

      String openRegistration(String nodeGroupId, String externalId)
      Open registration for a single new node given a node group (f.e., "STORE") and external ID (f.e., "00001"). The unique node ID and password are generated and stored in the node and node_security tables with the registration_enabled flag turned on. The next node to try registering for this node group and external ID will be given this information.
      Returns:
      the node id
    • openRegistration

      String openRegistration(String nodeGroup, String externalId, String syncUrl, Date notBefore, Date notAfter)
    • openRegistration

      String openRegistration(String nodeGroup, String externalId, String remoteHost, String remoteAddress)
    • openRegistration

      String openRegistration(Node node)
    • isRegistrationOpen

      boolean isRegistrationOpen(String nodeGroupId, String externalId)
    • isRegistrationOpen

      boolean isRegistrationOpen()
    • reOpenRegistration

      void reOpenRegistration(String nodeId)
      Re-open registration for a single node that already exists in the database. A new password is generated and the registration_enabled flag is turned on. The next node to try registering for this node group and external ID will be given this information.
    • reOpenRegistration

      void reOpenRegistration(String nodeId, boolean forceNewPassword)
    • markNodeAsRegistered

      void markNodeAsRegistered(String nodeId)
      Mark the passed in node as registered in node_security
      Parameters:
      nodeId - is the node that has just finished 'successfully' registering
    • isAutoRegistration

      boolean isAutoRegistration()
    • registerWithServer

      boolean registerWithServer()
      Client method which attempts to register with the registration.url to pull configuration if the node has not already been registered. If the registration server cannot be reach this method will continue to try with random sleep periods up to one minute up until the registration succeeds or the maximum number of attempts has been reached. Returns true if we had to register with server and was successful. Returns false if we did not have to register.
    • registerWithClient

      List<OutgoingBatch> registerWithClient(Node remote, IOutgoingWithResponseTransport transport)
      Server method which attempts to register using the registration URL of a client node using a push to send configuration. Returns configuration batch sent with its status.
    • attemptToRegisterWithServer

      boolean attemptToRegisterWithServer(int maxNumberOfAttempts)
      Client method which attempts to register with the registration.url to pull configuration if the node has not already been registered. Returns true if registered successfully
    • getRegistrationRequests

      List<RegistrationRequest> getRegistrationRequests(boolean includeNodesWithOpenRegistrations, boolean includeRejects)
    • deleteRegistrationRequest

      boolean deleteRegistrationRequest(RegistrationRequest request)
    • saveRegistrationRequest

      void saveRegistrationRequest(RegistrationRequest request)
    • isRegisteredWithServer

      boolean isRegisteredWithServer()
    • saveRegistrationRedirect

      void saveRegistrationRedirect(String externalIdToRedirect, String nodeIdToRedirectTo)
      Add an entry to the registation_redirect table so that if a node tries to register here. It will be redirected to the correct node.
    • getRedirectionUrlFor

      String getRedirectionUrlFor(String externalId)
    • requestNodeCopy

      void requestNodeCopy()
    • setAllowClientRegistration

      void setAllowClientRegistration(boolean enabled)
    • writeRegistrationProperties

      boolean writeRegistrationProperties(OutputStream os)
      When server pushes to client asking to register it, the client responds with its registration request properties
    • loadRegistrationBatch

      boolean loadRegistrationBatch(Node node, InputStream is, OutputStream os)
      When server pushes to client asking to register it, the client loads the configuration batch and returns an acknowledgement