ostore.update
Class ActionTruncate

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

public class ActionTruncate
extends Action

This action truncates a data object. The resulting object is zero bytes in length and all data previously in the object is lost.

Version:
$Id: ActionTruncate.java,v 1.20 2002/08/02 19:38:08 geels Exp $
Author:
Patrick R. Eaton

Field Summary
static boolean DEBUG
           
 
Constructor Summary
ActionTruncate(InputBuffer buffer)
           
ActionTruncate(SecureHash target)
          Construct an ActionTruncate action.
 
Method Summary
 long getLength()
          getLength returns the length of the ActionTruncate.
 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

ActionTruncate

public ActionTruncate(SecureHash target)
Construct an ActionTruncate action.

Parameters:
target - the Aguid of the target data object

ActionTruncate

public ActionTruncate(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 ActionTruncate.

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

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