Interface Service

  • All Known Subinterfaces:
    ClusterService, ClusterServiceManager, CodecService, CoordinationService, ElectionService, InjectionService, JmxService, LockService, MessagingService, NetworkService, NetworkServiceManager, ResourceService, RpcService

    public interface Service
    « start hereEntry point to core API of Hekate services.

    Overview

    Hekate utilizes the Service-oriented approach in order to provide a fine grained control over resources utilization and functionality of each individual Hekate instance. Each instance can be configured with only those services that are required for application needs without an overhead of managing services that are never used by the application.

    Note: Typically applications are not required to implement their own custom services and can act purely as clients of services that are provided by Hekate out of the box. Custom services should be implemented only in order to extend functionality of existing services or provide some new functionality that is not covered by Hekate API.

    Service Interface

    All services must implement Service marker interface in order to be accessible via Hekate.get(Class) method and can also optionally implement a set of callback interfaces in order to participate in Hekate instance lifecycle.

    The following lifecycle interfaces are available (in invocation order):

    Please see the documentation of those interfaces for more details.

    Service Factory

    Each service must have a ServiceFactory that is responsible for configuring and creating new service instances. Service factories can be registered via HekateBootstrap.setServices(List) method.

    Note: Each service gets created only once by each Hekate node during the initialization phase and never gets re-created even if node leaves and then rejoins the cluster.

    See Also:
    Hekate.get(Class)