public abstract class CloudMembershipProvider extends MembershipProviderBase implements Heartbeat, ChannelListener
Modifier and Type | Field and Description |
---|---|
protected int |
connectionTimeout |
protected java.util.Map<java.lang.String,java.lang.String> |
headers |
protected java.lang.String |
hostName |
protected java.security.MessageDigest |
md5 |
protected int |
port |
protected int |
readTimeout |
protected static StringManager |
sm |
protected java.time.Instant |
startTime |
protected StreamProvider |
streamProvider |
protected java.lang.String |
url |
executor, membership, membershipListener, service
Constructor and Description |
---|
CloudMembershipProvider() |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.io.Serializable msg,
Member sender)
Invoked by the channel to determine if the listener will process this message or not.
|
protected abstract Member[] |
fetchMembers()
Fetch current cluster members from the cloud orchestration.
|
protected static java.lang.String |
getEnv(java.lang.String... keys) |
void |
heartbeat()
Heartbeat invocation for resources cleanup etc
|
void |
init(java.util.Properties properties) |
void |
messageReceived(java.io.Serializable msg,
Member sender)
Receive a message from the channel
|
void |
start(int level) |
boolean |
stop(int level) |
getMember, getMembers, hasMembers, setMembershipListener, setMembershipService
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode
protected static final StringManager sm
protected java.lang.String url
protected StreamProvider streamProvider
protected int connectionTimeout
protected int readTimeout
protected java.time.Instant startTime
protected java.security.MessageDigest md5
protected java.util.Map<java.lang.String,java.lang.String> headers
protected int port
protected java.lang.String hostName
protected static java.lang.String getEnv(java.lang.String... keys)
public void init(java.util.Properties properties) throws java.io.IOException
init
in interface MembershipProvider
init
in class MembershipProviderBase
java.io.IOException
public void start(int level) throws java.lang.Exception
start
in interface MembershipProvider
java.lang.Exception
public boolean stop(int level) throws java.lang.Exception
stop
in interface MembershipProvider
java.lang.Exception
public void heartbeat()
Heartbeat
protected abstract Member[] fetchMembers()
public void messageReceived(java.io.Serializable msg, Member sender)
ChannelListener
messageReceived
in interface ChannelListener
msg
- Serializablesender
- - the source of the messagepublic boolean accept(java.io.Serializable msg, Member sender)
ChannelListener
accept
in interface ChannelListener
msg
- Serializablesender
- MemberCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.