public class DeleteObject extends Object implements RiakOperation<Void>
Use Bucket.delete(String)
or Bucket.delete(Object)
to create a delete operation.
Also look at DomainBucket.delete(Object)
and DomainBucket.delete(String)
.
Bucket
,
DomainBucket
Constructor and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
DeleteObject |
dw(int dw) |
DeleteObject |
dw(Quora dw) |
DeleteObject |
dw(Quorum dw) |
Void |
execute()
|
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 |
timeout(int timeout)
Set an operation timeout in milliseconds to be sent to Riak
As of 1.4 Riak allows a timeout to be sent for get, put, and delete operations.
|
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 |
public DeleteObject(RawClient client, String bucket, String key, Retrier retrier)
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.public Void execute() throws RiakException
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.execute
in interface RiakOperation<Void>
RiakException
public DeleteObject r(int r)
r
- the read quorum for the delete operationpublic DeleteObject r(Quora r)
r
- the read quorum for the delete operationpublic DeleteObject r(Quorum r)
r
- the read quorum for the delete operationpublic DeleteObject pr(int pr)
pr
- the primary read quorum for the delete operationpublic DeleteObject pr(Quora pr)
pr
- the primary read quorum for the delete operationpublic DeleteObject pr(Quorum pr)
pr
- the primary read quorum for the delete operationpublic DeleteObject w(int w)
w
- the write quorum for the delete tombstonepublic DeleteObject w(Quora w)
w
- the write quorum for the delete tombstonepublic DeleteObject w(Quorum w)
w
- the write quorum for the delete tombstonepublic DeleteObject dw(int dw)
dw
- the durable write quorum for the delete tombstonepublic DeleteObject dw(Quora dw)
dw
- the durable write quorum for the delete tombstonepublic DeleteObject dw(Quorum dw)
dw
- the durable write quorum for the delete tombstonepublic DeleteObject pw(int pw)
pw
- the primary write quorum for the delete tombstonepublic DeleteObject pw(Quora pw)
pw
- the primary write quorum for the delete tombstonepublic DeleteObject pw(Quorum pw)
pw
- the primary write quorum for the delete tombstonepublic DeleteObject rw(int rw)
rw
- an Integer
for the read/write quorumpublic DeleteObject rw(Quora rw)
rw
- an Integer
for the read/write quorumpublic DeleteObject rw(Quorum rw)
rw
- an Integer
for the read/write quorumpublic DeleteObject vclock(VClock vclock)
NOTE: you can, instead, fetchBeforeDelete
to get a vclock
vclock
- fetchBeforeDelete
public DeleteObject withRetrier(Retrier retrier)
Retrier
to use when executing this delete operationretrier
- a Retrier
public DeleteObject fetchBeforeDelete(boolean fetch)
fetch
- true true to fetch before delete, false if notpublic DeleteObject timeout(int timeout)
timeout
- Copyright © 2013. All Rights Reserved.