public class StorageRequest extends java.lang.Object implements Event
StorageNode
. Since requests can be forwarded to
any node (likely not the final destination) the request must be captured to
forward to the correct storage location. This is functionally the same as
a StorageEvent
, but with the above distinction.ByteSerializable.Deserialize
Constructor and Description |
---|
StorageRequest(Block block)
Constructs a StorageRequest to store a Block on an individual
StorageNode.
|
StorageRequest(SerializationInputStream in) |
Modifier and Type | Method and Description |
---|---|
Block |
getBlock()
Returns the block to be stored.
|
void |
serialize(SerializationOutputStream out)
Serializes this object to binary form by passing it through a
serialization stream.
|
public StorageRequest(Block block)
block
- the Block to be stored@ByteSerializable.Deserialize public StorageRequest(SerializationInputStream in) throws java.io.IOException, SerializationException
java.io.IOException
SerializationException
public Block getBlock()
public void serialize(SerializationOutputStream out) throws java.io.IOException
ByteSerializable
serialize
in interface ByteSerializable
out
- stream to serialize to.java.io.IOException