Interface Service

    • Method Detail

      • getCluster

        Cluster getCluster()
        Return the Cluster object that this Service is a part of.
        Returns:
        the Cluster object
      • getInfo

        ServiceInfo getInfo()
        Return the ServiceInfo object for this Service.
        Returns:
        the ServiceInfo object
      • addMemberListener

        void addMemberListener​(MemberListener listener)
        Add a Member listener.

        MemberListeners will be invoked in the order in which they are registered.

        Parameters:
        listener - the MemberListener to add
      • removeMemberListener

        void removeMemberListener​(MemberListener listener)
        Remove a Member listener.
        Parameters:
        listener - the MemberListener to remove
      • getUserContext

        Object getUserContext()
        Return the user context object associated with this Service.

        The data type and semantics of this context object are entirely application specific and are opaque to the Service itself.

        Returns:
        an associated user context object or null if a context has not been set
        Since:
        Coherence 3.0
      • setUserContext

        void setUserContext​(Object oCtx)
        Associate a user context object with this Service.
        Parameters:
        oCtx - a user context object
        Since:
        Coherence 3.0
      • getSerializer

        Serializer getSerializer()
        Return a Serializer used by this Service.
        Returns:
        the Serializer object
        Since:
        Coherence 3.4
      • setDependencies

        void setDependencies​(ServiceDependencies deps)
        Configure the Service.

        This method can only be called before the Service is started.

        Parameters:
        deps - the dependencies object carrying configuration information specific to this Service
        Throws:
        IllegalStateException - thrown if the Service is already running
        IllegalArgumentException - thrown if the configuration information is invalid
        Since:
        Coherence 12.1.3
      • getDependencies

        ServiceDependencies getDependencies()
        Return the service's dependencies.
        Returns:
        the service's dependencies
        Since:
        Coherence 12.2.1
      • getResourceRegistry

        ResourceRegistry getResourceRegistry()
        Retrieves a Service scoped ResourceRegistry. The resource registry is used to:
        • Register resources with the Service and make them accessible to the application code bound to this Service.
        • Dispose of resources when the Service is shut down; see the ResourceRegistry API for details on how to enable cleanup of resources.
        Returns:
        a Service scoped resource registry
        Since:
        Coherence 12.2.1