Class JGroupsRemoteConnection
java.lang.Object
org.eclipse.persistence.internal.sessions.coordination.RemoteConnection
org.eclipse.persistence.internal.sessions.coordination.broadcast.BroadcastRemoteConnection
org.eclipse.persistence.internal.sessions.coordination.jgroups.JGroupsRemoteConnection
- All Implemented Interfaces:
Serializable
Purpose: Define the implementation of the abstract RemoteConnection for JGroups.
Description: Executing commands implementation of RemoteConnection is done via JGroups JChannel.
- Since:
- EclipseLink 2.5
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.jgroups.JChannel
protected boolean
Fields inherited from class org.eclipse.persistence.internal.sessions.coordination.broadcast.BroadcastRemoteConnection
displayString, info, infoExt, rcm, state, STATE_ACTIVE, STATE_CLOSED, STATE_CLOSING, topicName
Fields inherited from class org.eclipse.persistence.internal.sessions.coordination.RemoteConnection
serviceId
-
Constructor Summary
ConstructorDescriptionCreates local connections.JGroupsRemoteConnection
(RemoteCommandManager rcm, org.jgroups.JChannel channel, boolean isLocalConnectionBeingCreated) INTERNAL: Constructor creating either a local or external connection. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
INTERNAL: Indicates whether all the resources used by connection are freed after close method returns.protected void
INTERNAL: This method is called by close method.protected void
INTERNAL: Used for debug loggingprotected Object
executeCommandInternal
(Object command) INTERNAL: Execute the remote command.boolean
isLocal()
INTERNAL: Indicates whether connection is local (subscriber) or external (publisher).protected String
logDebugMessage
(org.jgroups.Message message) INTERNAL:void
onMessage
(org.jgroups.Message message) INTERNAL: Process received JGroups message.protected boolean
INTERNAL: Return whether a BroadcastConnection should check a ServiceId against its own ServiceId to avoid the processing of Commands with the same ServiceId.Methods inherited from class org.eclipse.persistence.internal.sessions.coordination.broadcast.BroadcastRemoteConnection
close, executeCommand, executeCommand, failDeserializeMessage, getInfo, getInfoExt, getState, getTopicName, isActive, isClosed, isClosing, logDebugAfterPublish, logDebugBeforePublish, logDebugOnReceiveMessage, processReceivedObject, toString
Methods inherited from class org.eclipse.persistence.internal.sessions.coordination.RemoteConnection
getServiceId, setServiceId
-
Field Details
-
channel
protected transient org.jgroups.JChannel channel -
isLocal
protected boolean isLocal
-
-
Constructor Details
-
JGroupsRemoteConnection
public JGroupsRemoteConnection(RemoteCommandManager rcm, org.jgroups.JChannel channel, boolean isLocalConnectionBeingCreated) INTERNAL: Constructor creating either a local or external connection. -
JGroupsRemoteConnection
Creates local connections.
-
-
Method Details
-
isLocal
public boolean isLocal()INTERNAL: Indicates whether connection is local (subscriber) or external (publisher). -
executeCommandInternal
INTERNAL: Execute the remote command. The result of execution is returned. This method is used only by external (publishing) connection.- Specified by:
executeCommandInternal
in classBroadcastRemoteConnection
- Throws:
Exception
-
onMessage
public void onMessage(org.jgroups.Message message) INTERNAL: Process received JGroups message. This method is used only by local (listening) connection. -
areAllResourcesFreedOnClose
protected boolean areAllResourcesFreedOnClose()INTERNAL: Indicates whether all the resources used by connection are freed after close method returns.- Overrides:
areAllResourcesFreedOnClose
in classBroadcastRemoteConnection
-
closeInternal
protected void closeInternal()INTERNAL: This method is called by close method.- Specified by:
closeInternal
in classBroadcastRemoteConnection
-
logDebugMessage
INTERNAL: -
createDisplayString
protected void createDisplayString()INTERNAL: Used for debug logging- Overrides:
createDisplayString
in classBroadcastRemoteConnection
-
shouldCheckServiceId
protected boolean shouldCheckServiceId()INTERNAL: Return whether a BroadcastConnection should check a ServiceId against its own ServiceId to avoid the processing of Commands with the same ServiceId. Not required for JGroups.- Overrides:
shouldCheckServiceId
in classBroadcastRemoteConnection
- Returns:
- boolean
-