de.zib.scalaris.operations
Class PartialReadOp

java.lang.Object
  extended by de.zib.scalaris.operations.PartialReadOp
All Implemented Interfaces:
Operation, TransactionOperation, TransactionSingleOpOperation
Direct Known Subclasses:
ReadRandomFromListOp, ReadSublistOp

public abstract class PartialReadOp
extends Object
implements TransactionOperation, TransactionSingleOpOperation

Operation reading a partial value.

Since:
3.18
Version:
3.18
Author:
Nico Kruber, kruber@zib.de

Constructor Summary
PartialReadOp(OtpErlangString key)
          Constructor
PartialReadOp(String key)
          Constructor
 
Method Summary
 OtpErlangString getKey()
          Gets the key the operation is working on (if available)
 OtpErlangObject getResult()
          Gets the (raw Erlang) result set via Operation.setResult(OtpErlangObject, boolean).
 boolean getResultCompressed()
          Determines if the result set via Operation.setResult(OtpErlangObject, boolean) is compressed or not.
 void setResult(OtpErlangObject resultRaw, boolean compressed)
          Sets the raw erlang result value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.zib.scalaris.operations.TransactionSingleOpOperation
processResultSingle
 
Methods inherited from interface de.zib.scalaris.operations.Operation
getErlang, processResult
 

Constructor Detail

PartialReadOp

public PartialReadOp(OtpErlangString key)
Constructor

Parameters:
key - the key to read

PartialReadOp

public PartialReadOp(String key)
Constructor

Parameters:
key - the key to read
Method Detail

getKey

public OtpErlangString getKey()
Description copied from interface: Operation
Gets the key the operation is working on (if available)

Specified by:
getKey in interface Operation
Returns:
the key or null

setResult

public void setResult(OtpErlangObject resultRaw,
                      boolean compressed)
Description copied from interface: Operation
Sets the raw erlang result value. It can be processed using Operation.processResult().

Specified by:
setResult in interface Operation
Parameters:
resultRaw - the result
compressed - whether the value inside the result is compressed or not

getResult

public OtpErlangObject getResult()
Description copied from interface: Operation
Gets the (raw Erlang) result set via Operation.setResult(OtpErlangObject, boolean).

Specified by:
getResult in interface Operation
Returns:
the result object or null if not set

getResultCompressed

public boolean getResultCompressed()
Description copied from interface: Operation
Determines if the result set via Operation.setResult(OtpErlangObject, boolean) is compressed or not.

Specified by:
getResultCompressed in interface Operation
Returns:
true if compressed, false otherwise, undefined if no result was set