class OutputReconnectionManagerCNSImpl extends java.lang.Object implements OutputReconnectionManager
InputReconnectionManagerCNSImpl
should be
used at the input end.Modifier and Type | Field and Description |
---|---|
private NetChannelOutput |
chanOut
Underlying networked channel output end.
|
private java.lang.String |
cnsServiceName
Name of the CNS service to use.
|
private int |
maxAttemptCount
Constant specifying the maximum number of retry attempts before aborting a write operation.
|
private boolean |
serializable
true iff the object can be serialized and sent (migrated) to another node. |
Constructor and Description |
---|
OutputReconnectionManagerCNSImpl(NetChannelOutput out)
Constructs a new
OutputReconnectionManagerCNSImpl with the given underlying
networked channel output end. |
OutputReconnectionManagerCNSImpl(NetChannelOutput out,
java.lang.String cnsServiceName)
Constructs a new
OutputReconnectionManagerCNSImpl with the given underlying
networked channel output end using a specific CNS service. |
Modifier and Type | Method and Description |
---|---|
private void |
dealWithWriteError(java.lang.Object value,
java.lang.RuntimeException e)
Attempts to resolve the new channel location.
|
NetChannelOutput |
getOutputChannel()
Returns the underlying channel output end.
|
void |
prepareToMove()
Prepares the channel end for transfer to another node.
|
private void |
readObject(java.io.ObjectInputStream in)
Deserializes this object from an input stream.
|
private void |
writeObject(java.io.ObjectOutputStream out)
Serializes this object to the output stream.
|
private transient NetChannelOutput chanOut
private final int maxAttemptCount
private transient boolean serializable
true
iff the object can be serialized and sent (migrated) to another node.private java.lang.String cnsServiceName
public OutputReconnectionManagerCNSImpl(NetChannelOutput out)
OutputReconnectionManagerCNSImpl
with the given underlying
networked channel output end. The default CNS service name will be used.out
- underlying networked channel end.public OutputReconnectionManagerCNSImpl(NetChannelOutput out, java.lang.String cnsServiceName)
OutputReconnectionManagerCNSImpl
with the given underlying
networked channel output end using a specific CNS service.out
- the underlying networked channel end.cnsServiceName
- name of the CNS service to use.public NetChannelOutput getOutputChannel()
OutputReconnectionManager
getOutputChannel
in interface OutputReconnectionManager
OutputReconnectionManager.getOutputChannel()
private void dealWithWriteError(java.lang.Object value, java.lang.RuntimeException e)
maxAttemptCount
the write is considered to have failed and the original exception
is rethrown.value
- the data value that the user was trying to write and that should be written.e
- the exception originally raised to be thrown if the channel cannot be reconnected.public void prepareToMove()
OutputReconnectionManager
prepareToMove
in interface OutputReconnectionManager
OutputReconnectionManager.prepareToMove()
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
prepareToMove
should be called.out
- destination stream to serialize to.java.io.IOException
- if there is a problem with the output stream.private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
in
- input stream to read the object from.java.io.IOException
- if there is a problem with the input stream.java.lang.ClassNotFoundException
- if the class definition for the channel implementation cannot be
found. This is only likely to occur if there are different versions
of the infrastructure library on each node.