Class ClusterService

java.lang.Object
io.vertx.core.AbstractVerticle
org.pidome.server.services.AbstractService
org.pidome.server.services.cluster.ClusterService
All Implemented Interfaces:
io.vertx.core.Verticle

public class ClusterService extends AbstractService
The service for cluster management.
  • Constructor Details

    • ClusterService

      public ClusterService()
  • Method Details

    • start

      public void start(io.vertx.core.Promise<Void> startPromise)
      Starts the cluster service.
      Specified by:
      start in interface io.vertx.core.Verticle
      Specified by:
      start in class AbstractService
      Parameters:
      startPromise - The future to identify server start.
    • announce

      public void announce()
      Sends an announcement on the cluster to announce this node's presence.
      "To Do:"
      Service permissions required here.
    • getClusterMode

      public final ClusterMode getClusterMode()
      Returns the current cluster modus.
      Returns:
      The modus the instance is running in.
    • stop

      public void stop(io.vertx.core.Promise<Void> stopPromise)
      Stops the cluster service.
      Specified by:
      stop in interface io.vertx.core.Verticle
      Specified by:
      stop in class AbstractService
      Parameters:
      stopPromise - The future to identify server stop.
    • getHostInformation

      public io.vertx.core.Future<ClusterHost> getHostInformation()
      Returns the cluster host information.
      Returns:
      Host information.
    • getOptionalHostIdentification

      public Optional<ClusterHost> getOptionalHostIdentification()
      Returns the host identification.
      Returns:
      Host identification.