org.jgroups.blocks
public class NotificationBus extends Object implements MessageListener, MembershipListener
Nested Class Summary | |
---|---|
interface | NotificationBus.Consumer |
Field Summary | |
---|---|
protected Log | log |
Constructor Summary | |
---|---|
NotificationBus() | |
NotificationBus(String bus_name) | |
NotificationBus(String bus_name, String properties) |
Method Summary | |
---|---|
void | block() |
Serializable | getCache() |
Serializable | getCacheFromCoordinator(long timeout, int max_tries)
Determines the coordinator and asks it for its cache. |
Serializable | getCacheFromMember(Address mbr, long timeout, int max_tries)
Determines the coordinator and asks it for its cache. |
Channel | getChannel()
Answers the Channel.
|
Address | getLocalAddress() |
Vector | getMembership()
Returns a reference to the real membership: don't modify.
|
byte[] | getState() |
boolean | isCoordinator() |
void | notifyConsumer(Serializable n)
Don't multicast this to all members, just apply it to local consumers. |
void | receive(Message msg) |
void | sendNotification(Serializable n) Pack the argument in a Info, serialize that one into the message buffer and send the message |
void | setConsumer(NotificationBus.Consumer c) |
void | setState(byte[] state) |
void | start() |
void | stop() |
void | suspect(Address suspected_mbr) |
void | viewAccepted(View new_view) |
Parameters: timeout Max number of msecs until the call returns max_tries Max number of attempts to fetch the cache from the coordinator
Parameters: mbr The address of the member from which to fetch the state. If null, the current coordinator will be asked for the state timeout Max number of msecs until the call returns - if timeout elapses null will be returned max_tries Max number of attempts to fetch the cache from the coordinator (will be set to 1 if < 1)
Returns: underlying Channel
Returns: Vector of Address objects