Class TCPRemoteCommitProvider

    • Field Detail

      • s_loc

        protected static final Localizer s_loc
      • _port

        protected int _port
      • _addressesLock

        protected final java.util.concurrent.locks.ReentrantLock _addressesLock
    • Constructor Detail

      • TCPRemoteCommitProvider

        public TCPRemoteCommitProvider()
                                throws java.net.UnknownHostException
        Throws:
        java.net.UnknownHostException
    • Method Detail

      • getPort

        public int getPort()
        Returns:
        the port that this provider should listen on.
      • setPort

        public void setPort​(int port)
        Set the port that this provider should listen on. Set once only.
        Parameters:
        port - the port that this provider should listen on
      • setRecoveryTimeMillis

        public void setRecoveryTimeMillis​(int recoverytime)
        Set the number of milliseconds to wait before retrying to reconnect to a peer after it becomes unreachable.
        Parameters:
        recoverytime - the number of milliseconds to wait before retrying to reconnect to a peer after it becomes unreachable
      • getRecoveryTimeMillis

        public int getRecoveryTimeMillis()
        Returns:
        the number of milliseconds to wait before retrying to reconnect to a peer after it becomes unreachable.
      • setMaxActive

        @Deprecated
        public void setMaxActive​(int maxActive)
        Deprecated.
        Set the maximum number of sockets that this provider can simultaneously open to each peer in the cluster.
        Parameters:
        maxActive - the maximum total number of sockets that this provider can simultaneously open to each peer in the cluster. * @deprecated please use setMaxTotal(int) instead
      • setMaxTotal

        public void setMaxTotal​(int maxTotal)
        Set the maximum total number of sockets that this provider can simultaneously open to each peer in the cluster.
        Parameters:
        maxTotal - the maximum total number of sockets that this provider can simultaneously open to each peer in the cluster.
      • getMaxTotal

        public int getMaxTotal()
        Returns:
        the maximum number of sockets that this provider can simultaneously open to each peer in the cluster.
      • setMaxIdle

        public void setMaxIdle​(int maxIdle)
        Set the number of idle sockets that this provider can keep open to each peer in the cluster.
        Parameters:
        maxIdle - the number of idle sockets that this provider can keep open to each peer in the cluster
      • getMaxIdle

        public int getMaxIdle()
        Returns:
        the number of idle sockets that this provider can keep open to each peer in the cluster.
      • setNumBroadcastThreads

        public void setNumBroadcastThreads​(int numBroadcastThreads)
        Set the number of worker threads that are used for transmitting packets to peers in the cluster.
        Parameters:
        numBroadcastThreads - the number of worker threads that are used for transmitting packets to peers in the cluster
      • getNumBroadcastThreads

        public int getNumBroadcastThreads()
        Returns:
        the number of worker threads that are used for transmitting packets to peers in the cluster.
      • setAddresses

        public void setAddresses​(java.lang.String names)
                          throws java.net.UnknownHostException
        Sets the list of addresses of peers to which this provider will send events to. The peers are semicolon-separated names list in the form of "myhost1:portA;myhost2:portB".
        Parameters:
        names - the list of addresses of peers to which this provider will send events to
        Throws:
        java.net.UnknownHostException - in case peer name cannot be resolved
      • broadcast

        public void broadcast​(RemoteCommitEvent event)
        Description copied from interface: RemoteCommitProvider
        Notifies other remote event managers in this JVM and on other machines of changes to the cache. This method must not notify the event manager associated with the broker that originated this commit.
        Specified by:
        broadcast in interface RemoteCommitProvider