public class LargeState extends ReceiverAdapter
trace1=FRAG DEBUG STDOUT
If we didn't do this, we would have some retransmission, slowing the state transfer down.
Constructor and Description |
---|
LargeState() |
Modifier and Type | Method and Description |
---|---|
void |
getState(OutputStream ostream)
Allows an application to write a state through a provided OutputStream.
|
static void |
main(String[] args) |
void |
receive(Message msg)
Called when a message is received.
|
void |
setState(InputStream istream)
Allows an application to read a state through a provided InputStream.
|
void |
start(boolean provider,
int size,
String props,
boolean provider_fails,
boolean requester_fails,
long delay,
String name) |
void |
viewAccepted(View new_view)
Called when a change in membership has occurred.
|
block, suspect, unblock
public void start(boolean provider, int size, String props, boolean provider_fails, boolean requester_fails, long delay, String name) throws Exception
Exception
public void receive(Message msg)
ReceiverAdapter
receive
in interface MessageListener
receive
in class ReceiverAdapter
public void viewAccepted(View new_view)
ReceiverAdapter
Channel.connect(String)
returns.viewAccepted
in interface MembershipListener
viewAccepted
in class ReceiverAdapter
public void setState(InputStream istream) throws Exception
ReceiverAdapter
setState
in interface MessageListener
setState
in class ReceiverAdapter
istream
- the InputStreamException
- if the streaming fails, any exceptions should be thrown so that the state requester
can catch them and thus know what happenedInputStream.close()
public void getState(OutputStream ostream) throws Exception
ReceiverAdapter
getState
in interface MessageListener
getState
in class ReceiverAdapter
ostream
- the OutputStreamException
- if the streaming fails, any exceptions should be thrown so that the state requester
can re-throw them and let the caller know what happenedOutputStream.close()
public static void main(String[] args)
Copyright © 2020 JBoss, a division of Red Hat. All rights reserved.