public final class AllocateMessage extends Message<AllocateMessage.Response,AccessException>
AllocateMessage represents a request to allocate a number of
object IDs at a store.| Modifier and Type | Class and Description |
|---|---|
static class |
AllocateMessage.Response |
Message.MessageType, Message.NoException| Modifier and Type | Field and Description |
|---|---|
int |
num
The number of object IDs to allocate.
|
exceptionClass, messageType| Modifier | Constructor and Description |
|---|---|
protected |
AllocateMessage(java.io.DataInput in) |
|
AllocateMessage(int num) |
| Modifier and Type | Method and Description |
|---|---|
AllocateMessage.Response |
dispatch(RemoteIdentity<RemoteWorker> client,
MessageHandler h)
Visitor method.
|
protected AllocateMessage.Response |
readResponse(java.io.DataInput in)
Creates a Response message of the appropriate type using the provided
DataOutput |
protected void |
writeMessage(java.io.DataOutput out)
Writes this message out on the given output stream.
|
protected void |
writeResponse(java.io.DataOutput out,
AllocateMessage.Response r)
Writes a Response message of the appropriate type using the provided
DataOutput. |
readObject, readRef, receive, respond, respond, send, writeObject, writeRefpublic AllocateMessage(int num)
protected AllocateMessage(java.io.DataInput in)
throws java.io.IOException
java.io.IOExceptionpublic AllocateMessage.Response dispatch(RemoteIdentity<RemoteWorker> client, MessageHandler h) throws ProtocolError, AccessException
Messagedispatch in class Message<AllocateMessage.Response,AccessException>client - the node that is issuing the request.h - the handler to which this message is to be dispatched.ProtocolErrorAccessExceptionprotected void writeMessage(java.io.DataOutput out)
throws java.io.IOException
MessagewriteMessage in class Message<AllocateMessage.Response,AccessException>java.io.IOException - if the DataOutput fails.protected void writeResponse(java.io.DataOutput out,
AllocateMessage.Response r)
throws java.io.IOException
MessageDataOutput.writeResponse in class Message<AllocateMessage.Response,AccessException>java.io.IOException - if the DataOutput fails.protected AllocateMessage.Response readResponse(java.io.DataInput in) throws java.io.IOException
MessageDataOutputreadResponse in class Message<AllocateMessage.Response,AccessException>java.io.IOException - if the response is malformed, or if the DataInput
fails.