Interface ClusterDependencies


  • public interface ClusterDependencies
    The ClusterDependencies interface defines externally provided dependencies for a Cluster.
    Since:
    Coherence 12.1.3
    Author:
    pfm 2011.05.10
    • Field Detail

      • SHUTDOWN_NONE

        static final int SHUTDOWN_NONE
        Perform no local shutdown logic before exiting the JVM.
        See Also:
        Constant Field Values
      • SHUTDOWN_FORCE

        static final int SHUTDOWN_FORCE
        Forcefully shutdown all running services before exiting the JVM.
        See Also:
        Constant Field Values
      • SHUTDOWN_GRACEFUL

        static final int SHUTDOWN_GRACEFUL
        Gracefully shutdown all running services before exiting the JVM.
        See Also:
        Constant Field Values
      • EDITION_DATA_CLIENT

        static final int EDITION_DATA_CLIENT
        Data Client edition (DC).
        See Also:
        Constant Field Values
      • EDITION_REAL_TIME_CLIENT

        static final int EDITION_REAL_TIME_CLIENT
        Real time client edition (RTC).
        See Also:
        Constant Field Values
      • EDITION_STANDARD

        static final int EDITION_STANDARD
        Standard edition (SE).
        See Also:
        Constant Field Values
      • EDITION_COMMUNITY

        static final int EDITION_COMMUNITY
        Standard edition (SE).
        See Also:
        Constant Field Values
      • EDITION_ENTERPRISE

        static final int EDITION_ENTERPRISE
        Enterprise edition (EE).
        See Also:
        Constant Field Values
      • LICENSE_MODE_EVALUATION

        static final int LICENSE_MODE_EVALUATION
        Evaluation license.
        See Also:
        Constant Field Values
      • LICENSE_MODE_DEVELOPMENT

        static final int LICENSE_MODE_DEVELOPMENT
        Development license.
        See Also:
        Constant Field Values
      • LICENSE_MODE_PRODUCTION

        static final int LICENSE_MODE_PRODUCTION
        Production license.
        See Also:
        Constant Field Values
    • Method Detail

      • getAuthorizedHostFilter

        Filter getAuthorizedHostFilter()
        Obtain the filter that is used by the cluster to determine whether to accept a new Cluster member. The Filter.evaluate(T) method will be passed the java.net.InetAddress of the potential member. Implementations should return "true" to allow the new member to join the cluster.
        Returns:
        the authorized host filter
      • getClusterActionPolicyBuilder

        ActionPolicyBuilder getClusterActionPolicyBuilder()
        Obtain the action policy builder used by the cluster to control cluster membership actions.
        Returns:
        the cluster action policy builder
      • getClusterAnnounceTimeoutMillis

        int getClusterAnnounceTimeoutMillis()
        Obtain the maximum amount of time that the cluster service will announce itself without receiving a response before deciding that a cluster does not exist and a new cluster should be formed.
        Returns:
        the cluster announce timeout milliseconds
      • getClusterHeartbeatDelayMillis

        int getClusterHeartbeatDelayMillis()
        Obtain the amount of time between heartbeat messages.
        Returns:
        the cluster heartbeat delay
      • getClusterTimestampMaxVarianceMillis

        int getClusterTimestampMaxVarianceMillis()
        Obtain the maximum variance between sending and receiving broadcast messages when trying to determine the difference between a new cluster Member's wall time and the cluster time.

        The smaller the variance, the more certain one can be that the cluster time will be closer between multiple systems running in the cluster; however, the process of joining the cluster will be extended until an exchange of Messages can occur within the specified variance.

        Normally, a value as small as 20 milliseconds is sufficient, but with heavily loaded clusters and multiple network hops it is possible that a larger value would be necessary.

        Returns:
        the cluster timestamp maximum variance
      • getEdition

        int getEdition()
        Obtain the Coherence product edition.

        The valid value are:

        • 0=Data Client (DC)
        • 1=Real-Time Client (RTC)
        • 2=Standard Edition (SE)
        • 3=Community Edition (CE)
        • 4=Enterprise Edition (EE)
        • 5=Grid Edition (GE)

        Returns:
        the edition
      • getFilterList

        List<String> getFilterList()
        Obtain the list of all filters for the cluster.
        Returns:
        the filters list
      • getServiceFilterMap

        Map<String,​List<String>> getServiceFilterMap()
        Obtain a map of service name to filter list. Each map entry has the list of filters that will be used by the service.
        Returns:
        the service filter map
      • getFilterMap

        Map<String,​WrapperStreamFactory> getFilterMap()
        Obtain the map of filter name to WrapperStreamFactory.
        Returns:
        the filter map
      • getLocalDiscoveryAddress

        InetAddress getLocalDiscoveryAddress()
        Return the InetAddress on which this member will listen for discovery requests.
        Returns:
        the local discovery address.
      • getGroupAddress

        InetAddress getGroupAddress()
        Obtain the multicast group address to listen/publish on.
        Returns:
        the multicast group address, or null if WKA is enabled
      • getGroupBufferSize

        int getGroupBufferSize()
        Obtain the preferred size for the multicast datagram socket input buffer (SO_RCVBUF).

        A negative value indicates that this value specifies the number of packets, rather than number of bytes for the buffer.

        Returns:
        the group buffer size
      • getGroupInterface

        InetAddress getGroupInterface()
        Obtain the IP address of the interface (e.g. the NIC) that the MulticastSocket will open a socket on.
        Returns:
        the group interface
      • getGroupListenerPriority

        int getGroupListenerPriority()
        Obtain the priority of the PacketListener daemon thread.
        Returns:
        the group listener priority
      • getGroupPort

        int getGroupPort()
        Obtain the multicast port number that the cluster will listen/publish on.
        Returns:
        the group port
      • getGroupTimeToLive

        int getGroupTimeToLive()
        Obtain the multicast time-to-live setting for the cluster.

        The TTL sets the IP time-to-live for DatagramPackets sent to a MulticastGroup, which specifies how many "hops" that the packet will be forwarded on the network before it expires. The ttl must be in the range 0 <= ttl <= 255.

        Returns:
        the TTL value
      • getGuardTimeoutMillis

        long getGuardTimeoutMillis()
        Obtain the default Guard timeout.
        Returns:
        the Guard Timeout
      • getIpMonitorAttempts

        int getIpMonitorAttempts()
        Obtain the number of connection attempts that the IpMonitor will use in determining if IP connectivity exists to other hosts.
        Returns:
        number of IP monitor attempts
      • getIpMonitorPriority

        int getIpMonitorPriority()
        Obtain the priority of the IpMonitor daemon thread.
        Returns:
        IP monitor priority
      • getIpMonitorTimeoutMillis

        long getIpMonitorTimeoutMillis()
        Obtain the timeout that the IpMonitor will use in determining if IP connectivity exists to other hosts.
        Returns:
        the IP monitor timeout
      • getLocalBufferSize

        int getLocalBufferSize()
        Obtain the preferred size for the unicast socket input buffer (SO_RCVBUF).

        A negative value indicates that this value specifies the number of packets, rather then number bytes for the buffer.

        Returns:
        the local buffer size
      • getLocalListenerPriority

        int getLocalListenerPriority()
        Obtain the priority of the "local" PacketListener daemon thread.
        Returns:
        the local listener priority
      • getLocalAddress

        InetAddress getLocalAddress()
        Obtain the unicast IP address that the cluster member will listen/publish on or null for default.
        Returns:
        the local address, or null
      • getLocalPort

        int getLocalPort()
        Obtain the unicast port number that the member will listen on.
        Returns:
        the local port
      • getLostPacketThreshold

        int getLostPacketThreshold()
        Obtain the number of sequential packets which may be lost before declaring a member paused, and starting to trickle packets.
        Returns:
        the lost packet threshold
      • getMemberIdentity

        MemberIdentity getMemberIdentity()
        Obtain the member identity.
        Returns:
        the member identity
      • getOutstandingPacketMaximum

        int getOutstandingPacketMaximum()
        Obtain the maximum allowable flow-control rate measured in packets.
        Returns:
        the maximum number of outstanding packets
      • getOutstandingPacketMinimum

        int getOutstandingPacketMinimum()
        Obtain the minimum allowable flow-control rate measured in packets.
        Returns:
        the minimum number of outstanding packets
      • getPacketBundlingAggression

        double getPacketBundlingAggression()
        Obtain the aggression factor to use in deferring a packet once it has reached the average bundle size.
        Returns:
        the packet bundling aggression
      • getPacketBundlingThresholdNanos

        long getPacketBundlingThresholdNanos()
        Obtain the maximum amount of time to defer a packet while waiting for additional packets to bundle.
        Returns:
        the packet bundling threshold
      • getPacketMaxLength

        int getPacketMaxLength()
        Obtain the maximum size, in bytes, of the network packets that will be sent and received on the local and group sockets. This value should be greater or equal to 256.
        Returns:
        the maximum packet length
      • getPacketPreferredLength

        int getPacketPreferredLength()
        Obtain the preferred size, in bytes, of the network packets that will be sent and received on the local sockets.

        This value should be greater or equal to 256. If set to zero the value will be automatically computed based upon the MTU of the network interface associated with the local address.

        Returns:
        the preferred packet length
      • getPublisherAckDelayMillis

        int getPublisherAckDelayMillis()
        Obtain the amount of time that the Publisher may delay sending an ACK packet.
        Returns:
        the publisher ACK delay
      • getPublisherSocketBufferSize

        int getPublisherSocketBufferSize()
        Obtain the preferred size of the unicast socket output buffer (SO_SNDBUF).

        A negative value indicates that this value specifies the number of packets, rather than the number bytes for the buffer. A value of zero results in a value being automatically calculated.

        Returns:
        the publisher buffer size
      • getPublisherCloggedCount

        int getPublisherCloggedCount()
        Obtain the maximum number of packets in the send and re-send queues that the Publisher will tolerate before determining that it is clogged and must slow down client requests (requests from local non-system threads). Zero means no limit. This property prevents most unexpected out-of-memory conditions by limiting the size of the re-send queue.
        Returns:
        the publisher clogged count
      • getPublisherCloggedDelayMillis

        int getPublisherCloggedDelayMillis()
        Obtain the amount of time that the Publisher will pause a client thread that is trying to send a message when the Publisher is clogged. The Publisher will not allow the message to go through until the clog is resolved, and will repeatedly pause the thread for the duration specified by this value.
        Returns:
        the publisher clogged delay
      • getPublisherGroupThreshold

        int getPublisherGroupThreshold()
        Obtain the group threshold which is used to determine whether a packet will be sent via unicast or multicast.

        This is a percentage value and is in the range of 1% to 100%. In a cluster of "n" nodes, a particular node sending a packet to a set of others (not counting self) destination nodes of size "d" (in the range of 0 to n-1), the packet will be sent multicast if and only if the following holds true:

        1. The packet is being sent over the network to more than one other node: (d > 1);
        2. The number of nodes is greater than the threshold: (d > (n-1) * (threshold/100))
        Setting this value to 1 will allow the publisher to switch to multicast for basically all multi-point traffic. Setting it to 100 will force the publisher to use unicast for all multi-point traffic except for explicit broadcast messages (e.g. cluster heartbeat and discovery.) Note: that a values less then 100 will also prevent this cluster from sharing its cluster port with other clusters running on the same machine.

        Returns:
        the publisher group threshold
      • getPublisherNackDelayMillis

        int getPublisherNackDelayMillis()
        Obtain the amount of time that the Publisher will delay sending a NACK packet.
        Returns:
        the publisher NACK delay
      • getPublisherPriority

        int getPublisherPriority()
        Obtain the priority of the PacketPublisher daemon thread.
        Returns:
        the publisher priority
      • getPublisherResendDelayMillis

        int getPublisherResendDelayMillis()
        Obtain the minimum amount of time before a packet is resent across the network if it has not been acknowledged.

        This value is also used for other situations in which packets need to be resent, such as cluster announcements.

        Returns:
        the publisher resend delay
      • getPublisherResendTimeoutMillis

        int getPublisherResendTimeoutMillis()
        Obtain the maximum amount of time that the publisher will be resending a packet before the packet recipient is considered departed.
        Returns:
        the publisher resend timeout
      • getReceiverPriority

        int getReceiverPriority()
        Obtain the priority of the PacketReceiver daemon thread.
        Returns:
        the receiver priority
      • getReliableTransport

        String getReliableTransport()
        Obtain the name of the default reliable transport used by this node.
        Returns:
        the default reliable transport name
      • getServiceFailurePolicyBuilder

        ServiceFailurePolicyBuilder getServiceFailurePolicyBuilder()
        Obtain the service failure policy builder.
        Returns:
        the service failure policy builder
      • getShutdownHookOption

        int getShutdownHookOption()
        Obtain the value of the ShutdownHook setting.

        The valid values are the SHUTDOWN_* constants.

        Returns:
        the value of the ShutdownHook setting
      • getSocketProviderFactory

        SocketProviderFactory getSocketProviderFactory()
        Obtain the SocketProviderFactory associated with the cluster.
        Returns:
        the socket provider factory
      • getServiceMap

        Map<String,​String> getServiceMap()
        Obtain the service map.
        Returns:
        the map of service class information indexed by service name
      • getUnicastSocketProviderXml

        @Deprecated
        XmlElement getUnicastSocketProviderXml()
        Deprecated.
        Obtain the cluster's UnicastSocketProvider XML configuration.
        Returns:
        the unicast socket provider xml
      • getSpeakerPriority

        int getSpeakerPriority()
        Obtain the priority of the PacketSpeaker daemon thread.
        Returns:
        the PacketSpeaker priority
      • getSpeakerVolumeMinimum

        int getSpeakerVolumeMinimum()
        Obtain the minimum number of packets which must be ready to be sent in order for the speaker to be utilized. If the number of packets is less then this setting then the publisher will send the packets itself. A value of 0 will cause all packets to be handled by the speaker, a high value (Integer.MAX_VALUE) will cause all packets to be sent by the publisher.

        If this value is negative, the actual value will be based on the socket's send buffer size.

        Returns:
        the PacketSpeaker minimum volume
      • isSpeakerEnabled

        boolean isSpeakerEnabled()
        Determine whether the packet speaker is enabled.
        Returns:
        true if the speaker is enabled
      • getTcpBacklog

        int getTcpBacklog()
        Obtain the listener backlog for TCMP's TCP listener.
        Returns:
        the TCP listener backlog
      • getTcpDatagramSocketOptions

        SocketOptions getTcpDatagramSocketOptions()
        Obtain the SocketOptions to apply when TCMP runs on a TcpDatagramSocket.
        Returns:
        the TCMP datagram socket options
      • getTcpRingSocketOptions

        SocketOptions getTcpRingSocketOptions()
        Obtain the TcpRing SocketOptions.
        Returns:
        the TcpRing socket options
      • getWellKnownAddresses

        AddressProvider getWellKnownAddresses()
        Obtain the AddressProvider that provides the well known addresses (WKA) represented by InetSocketAddress objects.
        Returns:
        the well known addresses, or null for multicast
      • isFlowControlEnabled

        boolean isFlowControlEnabled()
        Determine whether the TCMP flow control is enabled.
        Returns:
        true if TCMP flow control is enabled
      • isIpMonitorEnabled

        boolean isIpMonitorEnabled()
        Determine whether the IpMonitor is enabled.
        Returns:
        true if IpMonitor is enabled
      • isLocalPortAutoAdjust

        boolean isLocalPortAutoAdjust()
        Determine whether the unicast listener local port(s) will be automatically selected if the specified port cannot be bound to (e.g. it is already in use.)
        Returns:
        true if unicast listener local port is automatically selected
      • getLocalPortAutoAdjust

        int getLocalPortAutoAdjust()
        Return the maximum unicast port that can be auto-adjusted to.
        Returns:
        the maximum unicast port that can be auto-adjusted to
      • isReceiverNackEnabled

        boolean isReceiverNackEnabled()
        Determine whether the PacketReceiver will use negative acknowledgments (NACK packet requests) to pro-actively respond to known missing packets.
        Returns:
        true if NACK is enabled
      • isTcmpEnabled

        boolean isTcmpEnabled()
        Determine whether the TCMP is enabled.
        Returns:
        true if TCMP is enabled
      • isTcpRingEnabled

        boolean isTcpRingEnabled()
        Determine whether the TcpRing is enabled.
        Returns:
        true if TcpRing is enabled
      • registerResources

        void registerResources​(ResourceRegistry registry)
        Register all the custom resources contained in this ClusterDependencies with the target registry.
        Parameters:
        registry - the target ResourceRegistry to register resources with
      • getLambdasSerializationMode

        String getLambdasSerializationMode()
        Obtain the lambdas serialization mode, i.e. static, dynamic or empty string, if not set.
        Returns:
        the lambdas serialization mode or empty string if not set.
        Since:
        23.09