ostore.update
Class ActionAppendBlocks

java.lang.Object
  |
  +--ostore.update.Action
        |
        +--ostore.update.ActionAppendBlocks
All Implemented Interfaces:
QuickSerializable

public class ActionAppendBlocks
extends Action

This action appends encryption-block sized blocks of data to a data object. It can only append whole blocks of data to a data object which ends on an encryption block boundary. See ActionAppendPartialBlock (when it exists).

Version:
$Id: ActionAppendBlocks.java,v 1.25 2002/08/27 20:11:52 eaton Exp $
Author:
Patrick R. Eaton

Field Summary
static boolean DEBUG
           
 
Constructor Summary
ActionAppendBlocks(InputBuffer buffer)
           
ActionAppendBlocks(SecureHash target, int num_blocks, int block_size, byte[] data)
          Construct an ActionAppendBlocks action.
 
Method Summary
 long getLength()
          getLength returns the length of the ActionAppendBlocks.
 Set getTargets()
           
 void perform(GuidVersionMap guid_map, VersionHandleCache version_cache, UpdateContinuation continuation, DataCache cache)
           
 void serialize(OutputBuffer buffer)
          Add the object to the buffer.
 String toString()
          Return a representation of this action as a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG
See Also:
Constant Field Values
Constructor Detail

ActionAppendBlocks

public ActionAppendBlocks(SecureHash target,
                          int num_blocks,
                          int block_size,
                          byte[] data)
Construct an ActionAppendBlocks action.

Parameters:
target - the Aguid of the target data object
num_blocks - the number of blocks to be appended
block_size - the size of the blocks to be appended
data - the data to be appended. The byte array must contain (num_blocks * block_size) bytes of data.

ActionAppendBlocks

public ActionAppendBlocks(InputBuffer buffer)
                   throws QSException
Method Detail

serialize

public void serialize(OutputBuffer buffer)
Description copied from interface: QuickSerializable
Add the object to the buffer.

Specified by:
serialize in interface QuickSerializable
Overrides:
serialize in class Action
Parameters:
buffer - the output buffer to add the object to

perform

public void perform(GuidVersionMap guid_map,
                    VersionHandleCache version_cache,
                    UpdateContinuation continuation,
                    DataCache cache)
             throws ostore.update.UpdateException
Overrides:
perform in class Action
ostore.update.UpdateException

getLength

public long getLength()
getLength returns the length of the ActionAppendBlocks.

Specified by:
getLength in class Action
Returns:
length of ActionAppendBlocks

getTargets

public Set getTargets()
Overrides:
getTargets in class Action

toString

public String toString()
Description copied from class: Action
Return a representation of this action as a string.

Specified by:
toString in class Action
Returns:
a string representation of this action