Class StaticMembershipProvider

    • Field Detail

      • channel

        protected Channel channel
      • staticMembers

        protected java.util.ArrayList<StaticMember> staticMembers
      • sendOptions

        protected int sendOptions
      • expirationTime

        protected long expirationTime
      • connectTimeout

        protected int connectTimeout
      • rpcTimeout

        protected long rpcTimeout
      • startLevel

        protected int startLevel
      • useThread

        protected boolean useThread
      • pingInterval

        protected long pingInterval
      • running

        protected volatile boolean running
    • Constructor Detail

      • StaticMembershipProvider

        public StaticMembershipProvider()
    • Method Detail

      • start

        public void start​(int level)
                   throws java.lang.Exception
        Specified by:
        start in interface MembershipProvider
        Throws:
        java.lang.Exception
      • stop

        public boolean stop​(int level)
                     throws java.lang.Exception
        Specified by:
        stop in interface MembershipProvider
        Throws:
        java.lang.Exception
      • setupMember

        protected Member setupMember​(Member mbr)
      • memberAdded

        protected void memberAdded​(Member member)
      • memberDisappeared

        protected void memberDisappeared​(Member member)
      • memberAlive

        protected void memberAlive​(Member member)
      • stopMembership

        protected void stopMembership​(Member[] members)
      • messageReceived

        public void messageReceived​(java.io.Serializable msg,
                                    Member sender)
        Description copied from interface: ChannelListener
        Receive a message from the channel
        Specified by:
        messageReceived in interface ChannelListener
        Parameters:
        msg - Serializable
        sender - - the source of the message
      • accept

        public boolean accept​(java.io.Serializable msg,
                              Member sender)
        Description copied from interface: ChannelListener
        Invoked by the channel to determine if the listener will process this message or not.
        Specified by:
        accept in interface ChannelListener
        Parameters:
        msg - Serializable
        sender - Member
        Returns:
        boolean
      • replyRequest

        public java.io.Serializable replyRequest​(java.io.Serializable msg,
                                                 Member sender)
        Description copied from interface: RpcCallback
        Allows sending a response to a received message.
        Specified by:
        replyRequest in interface RpcCallback
        Parameters:
        msg - The message
        sender - Member
        Returns:
        Serializable object, null if no reply should be sent
      • leftOver

        public void leftOver​(java.io.Serializable msg,
                             Member sender)
        Description copied from interface: RpcCallback
        If the reply has already been sent to the requesting thread, the rpc callback can handle any data that comes in after the fact.
        Specified by:
        leftOver in interface RpcCallback
        Parameters:
        msg - The message
        sender - Member
      • heartbeat

        public void heartbeat()
        Description copied from interface: Heartbeat
        Heartbeat invocation for resources cleanup etc
        Specified by:
        heartbeat in interface Heartbeat
      • checkExpired

        protected void checkExpired()
      • setChannel

        public void setChannel​(Channel channel)
      • setStaticMembers

        public void setStaticMembers​(java.util.ArrayList<StaticMember> staticMembers)