fabric.worker.remote.messages
Class TakeOwnershipMessage
java.lang.Object
fabric.messages.Message<RemoteWorker,R>
fabric.worker.remote.messages.InterWorkerMessage<TakeOwnershipMessage.Response>
fabric.worker.remote.messages.TakeOwnershipMessage
public class TakeOwnershipMessage
- extends InterWorkerMessage<TakeOwnershipMessage.Response>
Represents a request from a worker to take ownership of an object from
another worker.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tid
public final TransactionID tid
store
public final Store store
onum
public final long onum
TakeOwnershipMessage
public TakeOwnershipMessage(TransactionID tid,
Store store,
long onum)
TakeOwnershipMessage
public TakeOwnershipMessage(java.io.DataInput in)
throws java.io.IOException
- Throws:
java.io.IOException
dispatch
public TakeOwnershipMessage.Response dispatch(MessageHandlerThread handler)
throws ProtocolError
- Description copied from class:
Message
- Calls the appropriate
handle(...)
method on the handler.
- Overrides:
dispatch
in class Message<RemoteWorker,TakeOwnershipMessage.Response>
- Returns:
- the result computed by the handler
- Throws:
ProtocolError
send
public TakeOwnershipMessage.Response send(RemoteWorker remoteWorker)
throws UnreachableNodeException
- Throws:
UnreachableNodeException
response
public TakeOwnershipMessage.Response response(RemoteWorker worker,
java.io.DataInput in)
throws java.io.IOException
- Description copied from class:
Message
- Creates a Response message of the appropriate type using the provided input
stream.
- Specified by:
response
in class Message<RemoteWorker,TakeOwnershipMessage.Response>
- Parameters:
worker
- the remote node from which the response originated.in
- Input stream containing the message.
- Returns:
- A Response message with the appropriate type.
- Throws:
java.io.IOException
write
public void write(java.io.DataOutput out)
throws java.io.IOException
- Description copied from class:
Message
- Writes this message out on the given output stream. Only used by the
worker.
- Specified by:
write
in class Message<RemoteWorker,TakeOwnershipMessage.Response>
- Throws:
java.io.IOException
- if the output stream throws an IOException.