public class ExtendedReceiverAdapter extends Object implements ExtendedReceiver
| Constructor and Description |
|---|
ExtendedReceiverAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
block()
Called (usually by the FLUSH protocol), as an indication that the member should stop sending messages.
|
byte[] |
getState()
Answers the group state; e.g., when joining.
|
void |
getState(OutputStream ostream)
Allows an application to write a state through a provided OutputStream.
|
byte[] |
getState(String state_id)
Allows an application to provide a partial state as a byte array
|
void |
getState(String state_id,
OutputStream ostream)
Allows an application to write a partial state through a provided OutputStream.
|
void |
receive(Message msg)
Called when a message is received.
|
void |
setState(byte[] state)
Sets the group state; e.g., when joining.
|
void |
setState(InputStream istream)
Allows an application to read a state through a provided InputStream.
|
void |
setState(String state_id,
byte[] state)
Allows an application to read a partial state indicated by state_id from
a given state byte array parameter.
|
void |
setState(String state_id,
InputStream istream)
Allows an application to read a partial state through a provided InputStream.
|
void |
suspect(Address suspected_mbr)
Called whenever a member is suspected of having crashed,
but has not yet been excluded.
|
void |
unblock()
Called after the FLUSH protocol has unblocked previously blocked senders, and
messages can be sent again.
|
void |
viewAccepted(View new_view)
Called when a change in membership has occurred.
|
public byte[] getState(String state_id)
ExtendedMessageListenergetState in interface ExtendedMessageListenerstate_id - id of the partial state requestedpublic void setState(String state_id, byte[] state)
ExtendedMessageListenersetState in interface ExtendedMessageListenerstate_id - id of the partial state requestedstate - partial state for the given state_idpublic void receive(Message msg)
MessageListenerreceive in interface MessageListenerpublic byte[] getState()
MessageListenergetState in interface MessageListenerpublic void setState(byte[] state)
MessageListenersetState in interface MessageListenerpublic void viewAccepted(View new_view)
MembershipListenerChannel.connect(String) returns.viewAccepted in interface MembershipListenerpublic void suspect(Address suspected_mbr)
MembershipListenersuspect in interface MembershipListenerpublic void block()
MembershipListenerExtendedMembershipListener.unblock().
Note that block() is the equivalent of reception of a BlockEvent in the pull mode.block in interface MembershipListenerpublic void unblock()
ExtendedMembershipListenerNote that during new view installation we provide guarantee that unblock invocation strictly follows view installation at some node A belonging to that view . However, some other message M may squeeze in between view and unblock callbacks. For more details see https://jira.jboss.org/jira/browse/JGRP-986
unblock in interface ExtendedMembershipListenerpublic void getState(OutputStream ostream)
ExtendedMessageListenergetState in interface ExtendedMessageListenerostream - the OutputStreamOutputStream.close()public void getState(String state_id, OutputStream ostream)
ExtendedMessageListenergetState in interface ExtendedMessageListenerstate_id - id of the partial state requestedostream - the OutputStreamOutputStream.close()public void setState(InputStream istream)
ExtendedMessageListenersetState in interface ExtendedMessageListeneristream - the InputStreamInputStream.close()public void setState(String state_id, InputStream istream)
ExtendedMessageListenersetState in interface ExtendedMessageListenerstate_id - id of the partial state requestedistream - the InputStreamInputStream.close()Copyright © 2015 JBoss, a division of Red Hat. All rights reserved.