|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.infinispan.remoting.transport.AbstractTransport
org.infinispan.remoting.transport.jgroups.JGroupsTransport
public class JGroupsTransport
An encapsulation of a JGroups transport. JGroups transports can be configured using a variety of methods, usually by passing in one of the following properties:
JGroupsChannelLookup instanceGlobalConfiguration.setTransportProperties(java.util.Properties) or
in the Infinispan XML configuration file.
| Field Summary | |
|---|---|
protected Address |
address
|
protected ExecutorService |
asyncExecutor
|
protected org.jgroups.Channel |
channel
|
static String |
CHANNEL_LOOKUP
|
protected CountDownLatch |
channelConnectedLatch
|
static String |
CONFIGURATION_FILE
|
static String |
CONFIGURATION_STRING
|
static String |
CONFIGURATION_XML
|
protected Address |
coordinator
|
protected static String |
DEFAULT_JGROUPS_CONFIGURATION_FILE
|
protected InboundInvocationHandler |
inboundInvocationHandler
|
protected boolean |
isCoordinator
|
protected StreamingMarshaller |
marshaller
|
protected List<Address> |
members
|
protected CacheManagerNotifier |
notifier
|
protected Address |
physicalAddress
|
protected TypedProperties |
props
|
protected boolean |
startChannel
|
protected boolean |
stopChannel
|
| Fields inherited from class org.infinispan.remoting.transport.AbstractTransport |
|---|
configuration |
| Constructor Summary | |
|---|---|
JGroupsTransport()
|
|
JGroupsTransport(org.jgroups.Channel channel)
This form is used when the transport is created by an external source and passed in to the GlobalConfiguration. |
|
| Method Summary | |
|---|---|
void |
block()
|
Address |
getAddress()
Retrieves the current cache instance's network address |
org.jgroups.Channel |
getChannel()
|
CommandAwareRpcDispatcher |
getCommandAwareRpcDispatcher()
|
Address |
getCoordinator()
|
Log |
getLog()
|
List<Address> |
getMembers()
Returns a list of members in the current cluster view. |
List<Address> |
getPhysicalAddresses()
Retrieves the current cache instance's physical network addresses. |
int |
getViewId()
|
protected void |
initChannel()
|
void |
initialize(StreamingMarshaller marshaller,
ExecutorService asyncExecutor,
InboundInvocationHandler inboundInvocationHandler,
CacheManagerNotifier notifier)
Initializes the transport with global cache configuration and transport-specific properties. |
Map<Address,Response> |
invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpcCommand,
ResponseMode mode,
long timeout,
boolean usePriorityQueue,
ResponseFilter responseFilter)
Invokes an RPC call on other caches in the cluster. |
boolean |
isCoordinator()
|
boolean |
isMulticastCapable()
Tests whether the transport supports true multicast |
void |
start()
|
protected void |
startJGroupsChannelIfNeeded()
|
void |
stop()
|
void |
suspect(org.jgroups.Address suspected_mbr)
|
protected static org.jgroups.Address |
toJGroupsAddress(Address a)
|
void |
unblock()
|
void |
viewAccepted(org.jgroups.View newView)
|
void |
waitForChannelToConnect()
|
| Methods inherited from class org.infinispan.remoting.transport.AbstractTransport |
|---|
checkResponse, parseResponseAndAddToResponseList, setConfiguration |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CONFIGURATION_STRING
public static final String CONFIGURATION_XML
public static final String CONFIGURATION_FILE
public static final String CHANNEL_LOOKUP
protected static final String DEFAULT_JGROUPS_CONFIGURATION_FILE
protected boolean startChannel
protected boolean stopChannel
protected TypedProperties props
protected InboundInvocationHandler inboundInvocationHandler
protected StreamingMarshaller marshaller
protected ExecutorService asyncExecutor
protected CacheManagerNotifier notifier
protected org.jgroups.Channel channel
protected Address address
protected Address physicalAddress
protected volatile List<Address> members
protected volatile Address coordinator
protected volatile boolean isCoordinator
protected CountDownLatch channelConnectedLatch
| Constructor Detail |
|---|
public JGroupsTransport(org.jgroups.Channel channel)
channel - created and running channel to usepublic JGroupsTransport()
| Method Detail |
|---|
public Log getLog()
getLog in interface Transport
public void initialize(StreamingMarshaller marshaller,
ExecutorService asyncExecutor,
InboundInvocationHandler inboundInvocationHandler,
CacheManagerNotifier notifier)
Transport
initialize in interface Transportmarshaller - marshaller to use for marshalling and unmarshallingasyncExecutor - executor to use for asynchronous callsinboundInvocationHandler - handler for invoking remotely originating calls on the local cachenotifier - notifier to usepublic void start()
start in interface Lifecyclestart in interface Transportprotected void startJGroupsChannelIfNeeded()
public int getViewId()
getViewId in interface Transportpublic void stop()
stop in interface Lifecyclestop in interface Transportprotected void initChannel()
public boolean isCoordinator()
isCoordinator in interface Transportpublic Address getCoordinator()
getCoordinator in interface Transportpublic void waitForChannelToConnect()
public List<Address> getMembers()
Transport
getMembers in interface Transportpublic boolean isMulticastCapable()
Transport
isMulticastCapable in interface Transportpublic Address getAddress()
Transport
getAddress in interface Transportpublic List<Address> getPhysicalAddresses()
TransportTransport.getAddress().
getPhysicalAddresses in interface Transport
public Map<Address,Response> invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpcCommand,
ResponseMode mode,
long timeout,
boolean usePriorityQueue,
ResponseFilter responseFilter)
throws Exception
Transport
invokeRemotely in interface Transportrecipients - a list of Addresses to invoke the call on. If this is null, the call is broadcast to the
entire cluster.rpcCommand - the cache command to invokemode - the response mode to usetimeout - a timeout after which to throw a replication exception.usePriorityQueue - if true, a priority queue is used to deliver messages. May not be supported by all
implementations.responseFilter - a response filter with which to filter out failed/unwanted/invalid responses.
Exception - in the event of problems.public void viewAccepted(org.jgroups.View newView)
viewAccepted in interface org.jgroups.MembershipListenerpublic void suspect(org.jgroups.Address suspected_mbr)
suspect in interface org.jgroups.MembershipListenerpublic void block()
block in interface org.jgroups.MembershipListenerpublic void unblock()
unblock in interface org.jgroups.MembershipListenerprotected static org.jgroups.Address toJGroupsAddress(Address a)
public CommandAwareRpcDispatcher getCommandAwareRpcDispatcher()
public org.jgroups.Channel getChannel()
|
--> | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||