|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfabric.messages.Message<RemoteNode,PrepareTransactionMessage.Response>
fabric.messages.PrepareTransactionMessage
public class PrepareTransactionMessage
A PrepareTransactionMessage
represents a transaction request to
a store.
Nested Class Summary | |
---|---|
static class |
PrepareTransactionMessage.Response
|
Nested classes/interfaces inherited from class fabric.messages.Message |
---|
Message.MessageType |
Field Summary | |
---|---|
long |
commitTime
|
java.util.Collection<Object._Impl> |
creates
The objects created during the transaction, unserialized. |
LongKeyMap<java.lang.Integer> |
reads
|
java.util.Collection<SerializedObject> |
serializedCreates
The objects created during the transaction, serialized. |
java.util.Collection<SerializedObject> |
serializedWrites
The objects modified during the transaction, serialized. |
long |
tid
|
java.util.Collection<Object._Impl> |
writes
The objects modified during the transaction, unserialized. |
Fields inherited from class fabric.messages.Message |
---|
messageType |
Constructor Summary | |
---|---|
protected |
PrepareTransactionMessage(java.io.DataInput in)
Deserialization constructor. |
|
PrepareTransactionMessage(long tid,
long commitTime)
Used to prepare transactions at remote workers. |
|
PrepareTransactionMessage(long tid,
long commitTime,
java.util.Collection<Object._Impl> toCreate,
LongKeyMap<java.lang.Integer> reads,
java.util.Collection<Object._Impl> writes)
Only used by the worker. |
Method Summary | |
---|---|
PrepareTransactionMessage.Response |
dispatch(MessageHandlerThread w)
Calls the appropriate handle(...) method on the handler. |
PrepareTransactionMessage.Response |
dispatch(MessageHandlerThread handler)
Calls the appropriate handle(...) method on the handler. |
PrepareTransactionMessage.Response |
response(RemoteNode node,
java.io.DataInput in)
Creates a Response message of the appropriate type using the provided input stream. |
PrepareTransactionMessage.Response |
send(RemoteNode node)
|
void |
write(java.io.DataOutput out)
Writes this message out on the given output stream. |
Methods inherited from class fabric.messages.Message |
---|
receive, send |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final long tid
public final long commitTime
public final LongKeyMap<java.lang.Integer> reads
public final java.util.Collection<Object._Impl> creates
serializedCreates
field instead.
public final java.util.Collection<SerializedObject> serializedCreates
creates
field
instead.
public final java.util.Collection<Object._Impl> writes
serializedWrites
field instead.
public final java.util.Collection<SerializedObject> serializedWrites
writes
field
instead.
Constructor Detail |
---|
public PrepareTransactionMessage(long tid, long commitTime)
public PrepareTransactionMessage(long tid, long commitTime, java.util.Collection<Object._Impl> toCreate, LongKeyMap<java.lang.Integer> reads, java.util.Collection<Object._Impl> writes)
protected PrepareTransactionMessage(java.io.DataInput in) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public PrepareTransactionMessage.Response dispatch(MessageHandlerThread w) throws ProtocolError, TransactionPrepareFailedException
Message
handle(...)
method on the handler.
dispatch
in class Message<RemoteNode,PrepareTransactionMessage.Response>
ProtocolError
TransactionPrepareFailedException
public PrepareTransactionMessage.Response dispatch(MessageHandlerThread handler) throws ProtocolError, TransactionPrepareFailedException
Message
handle(...)
method on the handler.
dispatch
in class Message<RemoteNode,PrepareTransactionMessage.Response>
ProtocolError
TransactionPrepareFailedException
public PrepareTransactionMessage.Response send(RemoteNode node) throws UnreachableNodeException, TransactionPrepareFailedException
UnreachableNodeException
TransactionPrepareFailedException
public PrepareTransactionMessage.Response response(RemoteNode node, java.io.DataInput in) throws java.io.IOException
Message
response
in class Message<RemoteNode,PrepareTransactionMessage.Response>
node
- the remote node from which the response originated.in
- Input stream containing the message.
java.io.IOException
public void write(java.io.DataOutput out) throws java.io.IOException
Message
write
in class Message<RemoteNode,PrepareTransactionMessage.Response>
java.io.IOException
- if the output stream throws an IOException.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |