public class MERGE3 extends Protocol
Modifier and Type | Class and Description |
---|---|
protected class |
MERGE3.InfoSender |
static class |
MERGE3.MergeHeader |
protected class |
MERGE3.ViewConsistencyChecker |
Modifier and Type | Field and Description |
---|---|
protected long |
check_interval |
protected String |
cluster_name |
protected MERGE3.InfoSender |
info_sender |
protected Future<?> |
info_sender_future |
protected boolean |
is_coord |
protected Address |
local_addr |
protected long |
max_interval |
protected int |
max_participants_in_merge |
protected long |
min_interval |
protected int |
num_merge_events |
protected boolean |
only_coords_run_consistency_checker |
protected TimeScheduler |
timer |
protected boolean |
transport_supports_multicasting |
protected View |
view |
protected Future<?> |
view_consistency_checker |
protected ResponseCollector<View> |
view_rsps |
protected Map<Address,ViewId> |
views |
after_creation_hook, down_prot, ergonomics, id, log, stack, stats, up_prot
Constructor and Description |
---|
MERGE3() |
Modifier and Type | Method and Description |
---|---|
protected void |
addInfo(Address sender,
ViewId view_id,
String logical_name,
PhysicalAddress physical_addr)
Adds received INFO to views hashmap
|
void |
checkInconsistencies() |
void |
clearViews() |
protected long |
computeCheckInterval() |
protected Map<ViewId,Set<Address>> |
convertViews() |
protected MERGE3.MergeHeader |
createInfo() |
static List<View> |
detectDifferentViews(Map<Address,View> map) |
protected boolean |
differentViewIds() |
Object |
down(Event evt)
An event is to be sent down the stack.
|
String |
dumpViews() |
long |
getMaxInterval() |
long |
getMinInterval() |
int |
getNumMergeEvents() |
int |
getViews() |
void |
init()
Called after instance has been created (null constructor) and before protocol is started.
|
boolean |
isInfoSenderRunning() |
protected boolean |
isMergeRunning() |
boolean |
isMergeTaskRunning() |
boolean |
isViewConsistencyCheckerRunning() |
static Buffer |
marshal(View view) |
protected View |
readView(byte[] buffer,
int offset,
int length) |
void |
sendInfo() |
MERGE3 |
setMaxInterval(long val) |
MERGE3 |
setMinInterval(long i) |
protected void |
startInfoSender() |
protected void |
startViewConsistencyChecker() |
void |
stop()
This method is called on a
JChannel.disconnect() . |
protected void |
stopInfoSender() |
protected void |
stopViewConsistencyChecker() |
Object |
up(Message msg)
A single message was received.
|
accept, afterCreationHook, destroy, down, enableStats, getConfigurableObjects, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, getLog, getName, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getUpServices, getValue, isErgonomics, level, parse, providedDownServices, providedUpServices, requiredDownServices, requiredUpServices, resetStatistics, resetStats, setDownProtocol, setErgonomics, setId, setLevel, setProperties, setProtocolStack, setSocketFactory, setUpProtocol, setValue, start, statsEnabled, up, up
protected long min_interval
protected long max_interval
protected int max_participants_in_merge
protected boolean only_coords_run_consistency_checker
protected long check_interval
protected Address local_addr
protected volatile View view
protected TimeScheduler timer
protected final MERGE3.InfoSender info_sender
protected Future<?> info_sender_future
protected Future<?> view_consistency_checker
protected final ResponseCollector<View> view_rsps
protected boolean transport_supports_multicasting
protected String cluster_name
protected volatile boolean is_coord
protected int num_merge_events
public int getViews()
public int getNumMergeEvents()
public boolean isViewConsistencyCheckerRunning()
public boolean isMergeTaskRunning()
public boolean isInfoSenderRunning()
public String dumpViews()
public void clearViews()
public void sendInfo()
public void checkInconsistencies()
public void init() throws Exception
Protocol
public void stop()
Protocol
JChannel.disconnect()
. Stops work (e.g. by closing multicast socket).
Will be called from top to bottom. This means that at the time of the method invocation the
neighbor protocol below is still working. This method will replace the
STOP, STOP_OK, CLEANUP and CLEANUP_OK events. The ProtocolStack guarantees that
when this method is called all messages in the down queue will have been flushedpublic long getMinInterval()
public MERGE3 setMinInterval(long i)
public long getMaxInterval()
public MERGE3 setMaxInterval(long val)
protected long computeCheckInterval()
protected boolean isMergeRunning()
protected void startInfoSender()
protected void stopInfoSender()
protected void startViewConsistencyChecker()
protected void stopViewConsistencyChecker()
public Object down(Event evt)
Protocol
down_prot.down()
.public Object up(Message msg)
Protocol
protected View readView(byte[] buffer, int offset, int length)
protected MERGE3.MergeHeader createInfo()
protected void addInfo(Address sender, ViewId view_id, String logical_name, PhysicalAddress physical_addr)
protected boolean differentViewIds()
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.