org.jgroups.protocols
Class TEST_PING
java.lang.Object
org.jgroups.stack.Protocol
org.jgroups.protocols.Discovery
org.jgroups.protocols.TEST_PING
public class TEST_PING
- extends Discovery
This protocol allows for discovery to happen via data structures maintained
in memory rather than relying on JGroup's transport. This allows for
discovery to be much faster and predictable because it only relies on java
method calls rather than network calls. Clearly, this protocol only works
for clusters that are created in memory.
NOTE: This protocol implementation requires a new JGroups release cos it
relies on sendDiscoveryResponse() method being protected.
- Since:
- 5.0
- Author:
- Galder Zamarre�o
Fields inherited from class org.jgroups.protocols.Discovery |
break_on_coord_rsp, group_addr, is_server, local_addr, max_rank, members, num_discovery_requests, num_initial_members, num_initial_srv_members, num_ping_requests, ping_responses, rank, return_entire_cache, sender, timeout, timer, view |
Methods inherited from class org.jgroups.protocols.Discovery |
deserialize, discoveryRequestReceived, down, findAllMembers, findAllViews, findAllViewsAsString, findInitialMembers, findInitialMembers, findInitialMembersAsString, getNumberOfDiscoveryRequestsSent, getNumInitialMembers, getNumPingRequests, getTimeout, getView, handleConnect, handleDisconnect, init, makeView, providedUpServices, resetStats, serializeWithoutView, setNumInitialMembers, setNumPingRequests, setTimeout, up |
Methods inherited from class org.jgroups.stack.Protocol |
destroy, dumpStats, enableStats, getConfigurableObjects, getDownProtocol, getId, getLevel, getName, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getValue, isErgonomics, printStats, providedDownServices, requiredDownServices, requiredUpServices, setDownProtocol, setErgonomics, setId, setLevel, setProtocolStack, setSocketFactory, setUpProtocol, setValue, setValues, statsEnabled |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TEST_PING
public TEST_PING()
isDynamic
public boolean isDynamic()
- Specified by:
isDynamic
in class Discovery
start
public void start()
throws java.lang.Exception
- Description copied from class:
Protocol
- This method is called on a
Channel.connect(String)
. Starts work.
Protocols are connected and queues are ready to receive events.
Will be called from bottom to top. This call will replace
the START and START_OK events.
- Overrides:
start
in class Discovery
- Throws:
java.lang.Exception
- Thrown if protocol cannot be started successfully. This will cause the ProtocolStack
to fail, so Channel.connect(String)
will throw an exception
stop
public void stop()
- Description copied from class:
Protocol
- This method is called on a
Channel.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 flushed
- Overrides:
stop
in class Discovery
sendGetMembersRequest
public void sendGetMembersRequest(java.lang.String cluster_name,
Promise promise,
boolean returnViewsOnly)
throws java.lang.Exception
- Specified by:
sendGetMembersRequest
in class Discovery
- Throws:
java.lang.Exception
sendDiscoveryResponse
protected void sendDiscoveryResponse(Address logical_addr,
java.util.List<PhysicalAddress> physical_addrs,
boolean is_server,
java.lang.String logical_name,
Address sender)
- Overrides:
sendDiscoveryResponse
in class Discovery
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.