com.basho.riak.client.operations
Class DeleteObject

java.lang.Object
  extended by com.basho.riak.client.operations.DeleteObject
All Implemented Interfaces:
RiakOperation<Void>

public class DeleteObject
extends Object
implements RiakOperation<Void>

An operation to delete some data item from Riak.

Use Bucket.delete(String) or Bucket.delete(Object) to create a delete operation. Also look at DomainBucket.delete(Object) and DomainBucket.delete(String).

Author:
russell
See Also:
Bucket, DomainBucket

Constructor Summary
DeleteObject(RawClient client, String bucket, String key, Retrier retrier)
          Create a DeleteOperation that delegates to client to delete key from bucket using retrier to handle failures.
 
Method Summary
 DeleteObject dw(int dw)
           
 DeleteObject dw(Quora dw)
           
 DeleteObject dw(Quorum dw)
           
 Void execute()
          Uses the specified Retrier to call the specified RawClient's delete with bucket, key and (if specified) the rest of the delete operation parameters.
 DeleteObject fetchBeforeDelete(boolean fetch)
          If you want to provide a vclock to delete, but don't have one, setting this true will have the operation first perform a fetch (using the supplied r/pr parameters).
 DeleteObject pr(int pr)
           
 DeleteObject pr(Quora pr)
           
 DeleteObject pr(Quorum pr)
           
 DeleteObject pw(int pw)
           
 DeleteObject pw(Quora pw)
           
 DeleteObject pw(Quorum pw)
           
 DeleteObject r(int r)
           
 DeleteObject r(Quora r)
           
 DeleteObject r(Quorum r)
           
 DeleteObject rw(int rw)
          The read_write quorum for the delete operation
 DeleteObject rw(Quora rw)
          The read_write quorum for the delete operation
 DeleteObject rw(Quorum rw)
          The read_write quorum for the delete operation
 DeleteObject vclock(VClock vclock)
          Provide a vclock to riak for the delete operation.
 DeleteObject w(int w)
           
 DeleteObject w(Quora w)
           
 DeleteObject w(Quorum w)
           
 DeleteObject withRetrier(Retrier retrier)
          Set Retrier to use when executing this delete operation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeleteObject

public DeleteObject(RawClient client,
                    String bucket,
                    String key,
                    Retrier retrier)
Create a DeleteOperation that delegates to client to delete key from bucket using retrier to handle failures. Use Bucket.delete(String) or Bucket.delete(Object) to create a delete operation.

Parameters:
client - the RawClient to use
bucket - the bucket for the key to delete
key - the key of the item to delete
retrier - the Retrier to use for the delete operation
Method Detail

execute

public Void execute()
             throws RiakException
Uses the specified Retrier to call the specified RawClient's delete with bucket, key and (if specified) the rest of the delete operation parameters. If fetchBeforeDelete is true, then a fetch is performed first to get a vclock.

Specified by:
execute in interface RiakOperation<Void>
Returns:
null, always null.
Throws:
RiakException

r

public DeleteObject r(int r)
Parameters:
r - the read quorum for the delete operation
Returns:
this

r

public DeleteObject r(Quora r)
Parameters:
r - the read quorum for the delete operation
Returns:
this

r

public DeleteObject r(Quorum r)
Parameters:
r - the read quorum for the delete operation
Returns:
this

pr

public DeleteObject pr(int pr)
Parameters:
pr - the primary read quorum for the delete operation
Returns:
this

pr

public DeleteObject pr(Quora pr)
Parameters:
pr - the primary read quorum for the delete operation
Returns:
this

pr

public DeleteObject pr(Quorum pr)
Parameters:
pr - the primary read quorum for the delete operation
Returns:
this

w

public DeleteObject w(int w)
Parameters:
w - the write quorum for the delete tombstone
Returns:
this

w

public DeleteObject w(Quora w)
Parameters:
w - the write quorum for the delete tombstone
Returns:
this

w

public DeleteObject w(Quorum w)
Parameters:
w - the write quorum for the delete tombstone
Returns:
this

dw

public DeleteObject dw(int dw)
Parameters:
dw - the durable write quorum for the delete tombstone
Returns:
this

dw

public DeleteObject dw(Quora dw)
Parameters:
dw - the durable write quorum for the delete tombstone
Returns:
this

dw

public DeleteObject dw(Quorum dw)
Parameters:
dw - the durable write quorum for the delete tombstone
Returns:
this

pw

public DeleteObject pw(int pw)
Parameters:
pw - the primary write quorum for the delete tombstone
Returns:
this

pw

public DeleteObject pw(Quora pw)
Parameters:
pw - the primary write quorum for the delete tombstone
Returns:
this

pw

public DeleteObject pw(Quorum pw)
Parameters:
pw - the primary write quorum for the delete tombstone
Returns:
this

rw

public DeleteObject rw(int rw)
The read_write quorum for the delete operation

Parameters:
rw - an Integer for the read/write quorum
Returns:
this

rw

public DeleteObject rw(Quora rw)
The read_write quorum for the delete operation

Parameters:
rw - an Integer for the read/write quorum
Returns:
this

rw

public DeleteObject rw(Quorum rw)
The read_write quorum for the delete operation

Parameters:
rw - an Integer for the read/write quorum
Returns:
this

vclock

public DeleteObject vclock(VClock vclock)
Provide a vclock to riak for the delete operation.

NOTE: you can, instead, fetchBeforeDelete to get a vclock

Parameters:
vclock -
Returns:
this
See Also:
fetchBeforeDelete

withRetrier

public DeleteObject withRetrier(Retrier retrier)
Set Retrier to use when executing this delete operation

Parameters:
retrier - a Retrier
Returns:
this

fetchBeforeDelete

public DeleteObject fetchBeforeDelete(boolean fetch)
If you want to provide a vclock to delete, but don't have one, setting this true will have the operation first perform a fetch (using the supplied r/pr parameters). The vclock from that fetch will then be used in the delete operation

Parameters:
fetch - true true to fetch before delete, false if not
Returns:
this


Copyright © 2012. All Rights Reserved.