Module org.eclipse.persistence.core
Class CommandPropagator
java.lang.Object
org.eclipse.persistence.internal.sessions.coordination.CommandPropagator
- All Implemented Interfaces:
Runnable
Purpose: Synchronous and asynchronous propagation of remote commands
Description: Maintains a reference to the RemoteCommandManager to obtain the connection information required to send the commands. In sync mode the caller is blocked until the command has been sent along all of the connections. If in async mode then a CommandPropagator instance is further created for each of the connections and control is returned to the caller while the threads send the command to the remote services.
-
Field Summary
Modifier and TypeFieldDescriptionprotected Command
The command to sendprotected byte[]
The command to sendprotected RemoteConnection
Connection to send toprotected RemoteCommandManager
Reference to manager to get connections, etc. -
Constructor Summary
ConstructorDescriptionCommandPropagator
(RemoteCommandManager rcm, Command command, byte[] commandBytes) Constructor used to create the main propagatorCommandPropagator
(RemoteCommandManager rcm, Command command, byte[] commandBytes, RemoteConnection connection) Constructor used to create the async propagator threads -
Method Summary
Modifier and TypeMethodDescriptionvoid
INTERNAL: Asynchronously propagate the commandprotected Command
INTERNAL: Returns the command to be sentprotected RemoteCommandManager
INTERNAL: Returns the remote command managervoid
INTERNAL: We received the specified CommunicationException trying to execute the command over the specified connection.void
handleExceptionFromRemoteExecution
(RemoteConnection conn, String exString) INTERNAL: We received the specified exception String while executing the command over the specified connection.void
propagateCommand
(RemoteConnection connection) INTERNAL: Propagate the command to the specified connection.void
run()
INTERNAL: This is the execution method of the async propagation thread.void
INTERNAL: Synchronously propagate the command
-
Field Details
-
rcm
Reference to manager to get connections, etc. -
command
The command to send -
commandBytes
protected byte[] commandBytesThe command to send -
connection
Connection to send to
-
-
Constructor Details
-
CommandPropagator
Constructor used to create the main propagator -
CommandPropagator
public CommandPropagator(RemoteCommandManager rcm, Command command, byte[] commandBytes, RemoteConnection connection) Constructor used to create the async propagator threads
-
-
Method Details
-
getRemoteCommandManager
INTERNAL: Returns the remote command manager -
getCommand
INTERNAL: Returns the command to be sent -
synchronousPropagateCommand
public void synchronousPropagateCommand()INTERNAL: Synchronously propagate the command -
asynchronousPropagateCommand
public void asynchronousPropagateCommand()INTERNAL: Asynchronously propagate the command -
propagateCommand
INTERNAL: Propagate the command to the specified connection. -
handleExceptionFromRemoteExecution
INTERNAL: We received the specified exception String while executing the command over the specified connection. Turn it into a RemoteCommandManagerException and throw it on this, the client side. -
handleCommunicationException
INTERNAL: We received the specified CommunicationException trying to execute the command over the specified connection. We treat CommunicationExceptions as the transport-generic wrapper exception that wraps the transport exception, so the real exception that interests us is inside. -
run
public void run()INTERNAL: This is the execution method of the async propagation thread. It will create other threads, one each for the remote connections, to propagate the command.
-