public interface CouchbaseClientIF
extends net.spy.memcached.MemcachedClientIF
Modifier and Type | Method and Description |
---|---|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
add(java.lang.String key,
int exp,
java.lang.Object value,
net.spy.memcached.PersistTo req)
Add a value with durability options.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
add(java.lang.String key,
int exp,
java.lang.Object value,
net.spy.memcached.PersistTo req,
net.spy.memcached.ReplicateTo rep)
Add a value with durability options.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
add(java.lang.String key,
int exp,
java.lang.Object value,
net.spy.memcached.ReplicateTo rep)
Add a value with durability options.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
add(java.lang.String key,
java.lang.Object value)
Set a value with durability options and no TTL.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
add(java.lang.String key,
java.lang.Object value,
net.spy.memcached.PersistTo req)
Add a value with durability options with No TTL
This is a shorthand method so that you only need to provide a
PersistTo value if you don't care if the value is already replicated.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
add(java.lang.String key,
java.lang.Object value,
net.spy.memcached.PersistTo req,
net.spy.memcached.ReplicateTo rep)
Add a value with durability options with no TTL
To make sure that a value is stored the way you want it to in the
cluster, you can use the PersistTo and ReplicateTo arguments.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
add(java.lang.String key,
java.lang.Object value,
net.spy.memcached.ReplicateTo rep)
Add a value with durability options with no TTL
This method allows you to express durability at the replication level
only and is the functional equivalent of PersistTo.ZERO.
|
net.spy.memcached.internal.OperationFuture<net.spy.memcached.CASResponse> |
asyncCas(java.lang.String key,
long cas,
int exp,
java.lang.Object value,
net.spy.memcached.PersistTo req)
Set a value with a CAS and durability options.
|
net.spy.memcached.internal.OperationFuture<net.spy.memcached.CASResponse> |
asyncCas(java.lang.String key,
long cas,
int exp,
java.lang.Object value,
net.spy.memcached.PersistTo req,
net.spy.memcached.ReplicateTo rep)
Set a value with a CAS and durability options.
|
net.spy.memcached.internal.OperationFuture<net.spy.memcached.CASResponse> |
asyncCas(java.lang.String key,
long cas,
int exp,
java.lang.Object value,
net.spy.memcached.ReplicateTo rep)
Set a value with a CAS and durability options.
|
net.spy.memcached.internal.OperationFuture<net.spy.memcached.CASResponse> |
asyncCas(java.lang.String key,
long cas,
java.lang.Object value,
net.spy.memcached.PersistTo req)
Set a value with a CAS and durability options.
|
net.spy.memcached.internal.OperationFuture<net.spy.memcached.CASResponse> |
asyncCas(java.lang.String key,
long cas,
java.lang.Object value,
net.spy.memcached.PersistTo req,
net.spy.memcached.ReplicateTo rep)
Set a value with a CAS and durability options.
|
java.util.concurrent.Future<net.spy.memcached.CASResponse> |
asyncCas(java.lang.String key,
long cas,
java.lang.Object value,
net.spy.memcached.ReplicateTo rep)
Set a value with a CAS and durability options.
|
HttpFuture<java.lang.Boolean> |
asyncCreateDesignDoc(DesignDocument doc)
Store a design document in the cluster.
|
HttpFuture<java.lang.Boolean> |
asyncCreateDesignDoc(java.lang.String name,
java.lang.String value)
Store a design document in the cluster.
|
HttpFuture<java.lang.Boolean> |
asyncDeleteDesignDoc(java.lang.String name)
Delete a design document in the cluster.
|
java.util.concurrent.Future<net.spy.memcached.CASValue<java.lang.Object>> |
asyncGetAndLock(java.lang.String key,
int exp)
Get and lock the given key asynchronously and decode with the default
transcoder.
|
<T> java.util.concurrent.Future<net.spy.memcached.CASValue<T>> |
asyncGetAndLock(java.lang.String key,
int exp,
net.spy.memcached.transcoders.Transcoder<T> tc)
Gets and locks the given key asynchronously.
|
HttpFuture<DesignDocument> |
asyncGetDesignDoc(java.lang.String designDocumentName)
Gets a future with a design document from the cluster.
|
HttpFuture<DesignDocument> |
asyncGetDesignDocument(java.lang.String designDocumentName)
Deprecated.
|
ReplicaGetFuture<java.lang.Object> |
asyncGetFromReplica(java.lang.String key)
Asynchronously get a document from the replica (or the active) nodes.
|
<T> ReplicaGetFuture<T> |
asyncGetFromReplica(java.lang.String key,
net.spy.memcached.transcoders.Transcoder<T> tc)
Asynchronously get a document from the replica (or the active) nodes with
a custom transcoder.
|
ReplicaGetFuture<net.spy.memcached.CASValue<java.lang.Object>> |
asyncGetsFromReplica(java.lang.String key)
Asynchronously get a document and its CAS from the replica (or the active)
nodes.
|
<T> ReplicaGetFuture<net.spy.memcached.CASValue<T>> |
asyncGetsFromReplica(java.lang.String key,
net.spy.memcached.transcoders.Transcoder<T> tc)
Asynchronously get a document and its CAS from the replica (or the active)
nodes with a custom transcoder.
|
HttpFuture<SpatialView> |
asyncGetSpatialView(java.lang.String designDocumentName,
java.lang.String viewName)
Gets access to a spatial view contained in a design document from the
cluster.
|
HttpFuture<View> |
asyncGetView(java.lang.String designDocumentName,
java.lang.String viewName)
Gets access to a view contained in a design document from the cluster.
|
HttpFuture<ViewResponse> |
asyncQuery(AbstractView view,
Query query) |
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
asyncUnlock(java.lang.String key,
long casId)
Unlock the given key asynchronously from the cache with the default
transcoder.
|
<T> net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
asyncUnlock(java.lang.String key,
long casId,
net.spy.memcached.transcoders.Transcoder<T> tc)
Unlock the given key asynchronously from the cache.
|
net.spy.memcached.CASResponse |
cas(java.lang.String key,
long cas,
int exp,
java.lang.Object value,
net.spy.memcached.PersistTo req)
Set a value with a CAS and durability options.
|
net.spy.memcached.CASResponse |
cas(java.lang.String key,
long cas,
int exp,
java.lang.Object value,
net.spy.memcached.PersistTo req,
net.spy.memcached.ReplicateTo rep)
Set a value with a CAS and durability options.
|
net.spy.memcached.CASResponse |
cas(java.lang.String key,
long cas,
int exp,
java.lang.Object value,
net.spy.memcached.ReplicateTo rep)
Set a value with a CAS and durability options.
|
net.spy.memcached.CASResponse |
cas(java.lang.String key,
long cas,
java.lang.Object value,
net.spy.memcached.PersistTo req)
Set a value with a CAS and durability options.
|
net.spy.memcached.CASResponse |
cas(java.lang.String key,
long cas,
java.lang.Object value,
net.spy.memcached.PersistTo req,
net.spy.memcached.ReplicateTo rep)
Set a value with a CAS and durability options.
|
net.spy.memcached.CASResponse |
cas(java.lang.String key,
long cas,
java.lang.Object value,
net.spy.memcached.ReplicateTo rep)
Set a value with a CAS and durability options.
|
java.lang.Boolean |
createDesignDoc(DesignDocument doc)
Store a design document in the cluster.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
delete(java.lang.String key,
net.spy.memcached.PersistTo req)
Delete a value with durability options for persistence.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
delete(java.lang.String key,
net.spy.memcached.PersistTo req,
net.spy.memcached.ReplicateTo rep)
Delete a value with durability options.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
delete(java.lang.String key,
net.spy.memcached.ReplicateTo req)
Delete a value with durability options for replication.
|
java.lang.Boolean |
deleteDesignDoc(java.lang.String name)
Delete a design document in the cluster.
|
net.spy.memcached.CASValue<java.lang.Object> |
getAndLock(java.lang.String key,
int exp)
Get and lock with a single key and decode using the default transcoder.
|
<T> net.spy.memcached.CASValue<T> |
getAndLock(java.lang.String key,
int exp,
net.spy.memcached.transcoders.Transcoder<T> tc)
Getl with a single key.
|
DesignDocument |
getDesignDoc(java.lang.String designDocumentName)
Returns a representation of a design document stored in the cluster.
|
DesignDocument |
getDesignDocument(java.lang.String designDocumentName)
Deprecated.
|
java.lang.Object |
getFromReplica(java.lang.String key)
Get a document from the replica (or the active) nodes.
|
<T> T |
getFromReplica(java.lang.String key,
net.spy.memcached.transcoders.Transcoder<T> tc)
Get a document from the replica (or the active) nodes and use a custom
transcoder.
|
net.spy.memcached.internal.OperationFuture<java.util.Map<java.lang.String,java.lang.String>> |
getKeyStats(java.lang.String key) |
int |
getNumVBuckets()
Gets the number of vBuckets that are contained in the cluster.
|
net.spy.memcached.CASValue<java.lang.Object> |
getsFromReplica(java.lang.String key)
Get a document and its CAS from the replica (or the active) nodes.
|
<T> net.spy.memcached.CASValue<T> |
getsFromReplica(java.lang.String key,
net.spy.memcached.transcoders.Transcoder<T> tc)
Get a document and its CAS from the replica (or the active) nodes and use
a custom transcoder.
|
SpatialView |
getSpatialView(java.lang.String designDocumentName,
java.lang.String viewName)
Gets access to a spatial view contained in a design document from the
cluster.
|
View |
getView(java.lang.String designDocumentName,
java.lang.String viewName)
Gets access to a view contained in a design document from the cluster.
|
java.util.Map<net.spy.memcached.MemcachedNode,net.spy.memcached.ObserveResponse> |
observe(java.lang.String key,
long cas)
Observe a key with a associated CAS.
|
void |
observePoll(java.lang.String key,
long cas,
net.spy.memcached.PersistTo persist,
net.spy.memcached.ReplicateTo replicate,
boolean isDelete)
Poll and observe a key with the given CAS and persist settings.
|
Paginator |
paginatedQuery(View view,
Query query,
int docsPerPage)
A paginated query allows the user to get the results of a large query in
small chunks allowing for better performance.
|
ViewResponse |
query(AbstractView view,
Query query)
Queries a Couchbase view and returns the result.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
replace(java.lang.String key,
int exp,
java.lang.Object value,
net.spy.memcached.PersistTo req)
Replace a value with durability options.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
replace(java.lang.String key,
int exp,
java.lang.Object value,
net.spy.memcached.PersistTo req,
net.spy.memcached.ReplicateTo rep)
Replace a value with durability options.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
replace(java.lang.String key,
int exp,
java.lang.Object value,
net.spy.memcached.ReplicateTo rep)
Replace a value with durability options.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
replace(java.lang.String key,
java.lang.Object value)
Add a value with durability options.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
replace(java.lang.String key,
java.lang.Object value,
net.spy.memcached.PersistTo req)
Replace a value with durability options with no TTL
This is a shorthand method so that you only need to provide a
PersistTo value if you don't care if the value is already replicated.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
replace(java.lang.String key,
java.lang.Object value,
net.spy.memcached.PersistTo req,
net.spy.memcached.ReplicateTo rep)
Replace a value with durability options with no TTL.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
replace(java.lang.String key,
java.lang.Object value,
net.spy.memcached.ReplicateTo rep)
Replace a value with durability options with no TTL
This method allows you to express durability at the replication level
only and is the functional equivalent of PersistTo.ZERO.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
set(java.lang.String key,
int exp,
java.lang.Object value,
net.spy.memcached.PersistTo req)
Set a value with durability options.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
set(java.lang.String key,
int exp,
java.lang.Object value,
net.spy.memcached.PersistTo req,
net.spy.memcached.ReplicateTo rep)
Set a value with durability options.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
set(java.lang.String key,
int exp,
java.lang.Object value,
net.spy.memcached.ReplicateTo rep)
Set a value with durability options.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
set(java.lang.String key,
java.lang.Object value)
Set a value without any durability options with no TTL.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
set(java.lang.String key,
java.lang.Object value,
net.spy.memcached.PersistTo req)
Set a value with durability options with no TTL
This is a shorthand method so that you only need to provide a
PersistTo value if you don't care if the value is already replicated.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
set(java.lang.String key,
java.lang.Object value,
net.spy.memcached.PersistTo req,
net.spy.memcached.ReplicateTo rep)
Set a value with durability options and not TTL.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
set(java.lang.String key,
java.lang.Object value,
net.spy.memcached.ReplicateTo rep)
Set a value with durability option and no TTL
This method allows you to express durability at the replication level
only and is the functional equivalent of PersistTo.ZERO.
|
java.lang.Boolean |
unlock(java.lang.String key,
long casId)
Unlock the given key synchronously from the cache with the default
transcoder.
|
<T> java.lang.Boolean |
unlock(java.lang.String key,
long casId,
net.spy.memcached.transcoders.Transcoder<T> tc)
Unlock the given key synchronously from the cache.
|
add, add, addObserver, append, append, append, append, asyncCAS, asyncCAS, asyncCAS, asyncCAS, asyncDecr, asyncDecr, asyncDecr, asyncDecr, asyncDecr, asyncDecr, asyncGet, asyncGet, asyncGetAndTouch, asyncGetAndTouch, asyncGetBulk, asyncGetBulk, asyncGetBulk, asyncGetBulk, asyncGetBulk, asyncGetBulk, asyncGetBulk, asyncGetBulk, asyncGets, asyncGets, asyncIncr, asyncIncr, asyncIncr, asyncIncr, asyncIncr, asyncIncr, broadcastOp, broadcastOp, cas, cas, cas, cas, decr, decr, decr, decr, decr, decr, delete, delete, flush, flush, get, get, getAndTouch, getAndTouch, getAvailableServers, getBulk, getBulk, getBulk, getBulk, getBulk, getBulk, getNodeLocator, gets, gets, getStats, getStats, getTranscoder, getUnavailableServers, getVersions, incr, incr, incr, incr, incr, incr, listSaslMechanisms, prepend, prepend, prepend, prepend, removeObserver, replace, replace, set, set, shutdown, shutdown, touch, touch, waitForQueues
java.util.concurrent.Future<net.spy.memcached.CASValue<java.lang.Object>> asyncGetAndLock(java.lang.String key, int exp)
key
- the key to fetch and lockexp
- the amount of time the lock should be valid for in seconds.java.lang.IllegalStateException
- in the rare circumstance where queue is too
full to accept any more requests<T> java.util.concurrent.Future<net.spy.memcached.CASValue<T>> asyncGetAndLock(java.lang.String key, int exp, net.spy.memcached.transcoders.Transcoder<T> tc)
key
- the key to fetch and lockexp
- the amount of time the lock should be valid for in seconds.tc
- the transcoder to serialize and unserialize valuejava.lang.IllegalStateException
- in the rare circumstance where queue is too
full to accept any more requests<T> net.spy.memcached.CASValue<T> getAndLock(java.lang.String key, int exp, net.spy.memcached.transcoders.Transcoder<T> tc)
key
- the key to get and lockexp
- the amount of time the lock should be valid for in seconds.tc
- the transcoder to serialize and unserialize valuenet.spy.memcached.OperationTimeoutException
- if the global operation timeout is
exceededjava.lang.IllegalStateException
- in the rare circumstance where queue is too
full to accept any more requestsjava.util.concurrent.CancellationException
- if operation was cancelednet.spy.memcached.CASValue<java.lang.Object> getAndLock(java.lang.String key, int exp)
key
- the key to get and lockexp
- the amount of time the lock should be valid for in seconds.net.spy.memcached.OperationTimeoutException
- if the global operation timeout is
exceededjava.lang.IllegalStateException
- in the rare circumstance where queue is too
full to accept any more requests<T> net.spy.memcached.internal.OperationFuture<java.lang.Boolean> asyncUnlock(java.lang.String key, long casId, net.spy.memcached.transcoders.Transcoder<T> tc)
key
- the key to unlockcasId
- the CAS identifiertc
- the transcoder to serialize and unserialize valuejava.lang.IllegalStateException
- in the rare circumstance where queue is too
full to accept any more requestsnet.spy.memcached.internal.OperationFuture<java.lang.Boolean> asyncUnlock(java.lang.String key, long casId)
key
- the key to unlockcasId
- the CAS identifierjava.lang.IllegalStateException
- in the rare circumstance where queue is too
full to accept any more requests<T> java.lang.Boolean unlock(java.lang.String key, long casId, net.spy.memcached.transcoders.Transcoder<T> tc)
key
- the key to unlockcasId
- the CAS identifiertc
- the transcoder to serialize and unserialize valuejava.lang.IllegalStateException
- in the rare circumstance where queue is too
full to accept any more requestsjava.util.concurrent.CancellationException
- if operation was canceledjava.lang.Boolean unlock(java.lang.String key, long casId)
key
- the key to unlockcasId
- the CAS identifierjava.lang.IllegalStateException
- in the rare circumstance where queue is too
full to accept any more requestsjava.util.Map<net.spy.memcached.MemcachedNode,net.spy.memcached.ObserveResponse> observe(java.lang.String key, long cas)
key
- the key to observe.cas
- the CAS of the key (0 will ignore it).java.lang.IllegalStateException
- in the rare circumstance where queue is too
full to accept any more requests.void observePoll(java.lang.String key, long cas, net.spy.memcached.PersistTo persist, net.spy.memcached.ReplicateTo replicate, boolean isDelete)
key
- the key to observe.cas
- the CAS value for the key.persist
- the persistence settings.replicate
- the replication settings.isDelete
- if the key is to be deleted.net.spy.memcached.internal.OperationFuture<java.lang.Boolean> set(java.lang.String key, java.lang.Object value)
key
- the key to store.value
- the value of the key.net.spy.memcached.internal.OperationFuture<java.lang.Boolean> set(java.lang.String key, int exp, java.lang.Object value, net.spy.memcached.PersistTo req)
key
- the key to store.exp
- the expiry value to use.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.net.spy.memcached.internal.OperationFuture<java.lang.Boolean> set(java.lang.String key, java.lang.Object value, net.spy.memcached.PersistTo req)
key
- the key to store.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.net.spy.memcached.internal.OperationFuture<java.lang.Boolean> set(java.lang.String key, int exp, java.lang.Object value, net.spy.memcached.ReplicateTo rep)
key
- the key to store.exp
- the expiry value to use.value
- the value of the key.rep
- the amount of nodes the item should be replicated to before
returning.net.spy.memcached.internal.OperationFuture<java.lang.Boolean> set(java.lang.String key, java.lang.Object value, net.spy.memcached.ReplicateTo rep)
key
- the key to store.value
- the value of the key.rep
- the amount of nodes the item should be replicated to before
returning.net.spy.memcached.internal.OperationFuture<java.lang.Boolean> set(java.lang.String key, int exp, java.lang.Object value, net.spy.memcached.PersistTo req, net.spy.memcached.ReplicateTo rep)
key
- the key to store.exp
- the expiry value to use.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.rep
- the amount of nodes the item should be replicated to before
returning.net.spy.memcached.internal.OperationFuture<java.lang.Boolean> set(java.lang.String key, java.lang.Object value, net.spy.memcached.PersistTo req, net.spy.memcached.ReplicateTo rep)
key
- the key to store.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.rep
- the amount of nodes the item should be replicated to before
returning.net.spy.memcached.internal.OperationFuture<java.lang.Boolean> add(java.lang.String key, java.lang.Object value)
key
- the key to store.value
- the value of the key.net.spy.memcached.internal.OperationFuture<java.lang.Boolean> add(java.lang.String key, int exp, java.lang.Object value, net.spy.memcached.PersistTo req)
key
- the key to store.exp
- the expiry value to use.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.net.spy.memcached.internal.OperationFuture<java.lang.Boolean> add(java.lang.String key, java.lang.Object value, net.spy.memcached.PersistTo req)
key
- the key to store.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.net.spy.memcached.internal.OperationFuture<java.lang.Boolean> add(java.lang.String key, int exp, java.lang.Object value, net.spy.memcached.ReplicateTo rep)
key
- the key to store.exp
- the expiry value to use.value
- the value of the key.rep
- the amount of nodes the item should be replicated to before
returning.net.spy.memcached.internal.OperationFuture<java.lang.Boolean> add(java.lang.String key, java.lang.Object value, net.spy.memcached.ReplicateTo rep)
key
- the key to store.value
- the value of the key.rep
- the amount of nodes the item should be replicated to before
returning.net.spy.memcached.internal.OperationFuture<java.lang.Boolean> add(java.lang.String key, int exp, java.lang.Object value, net.spy.memcached.PersistTo req, net.spy.memcached.ReplicateTo rep)
key
- the key to store.exp
- the expiry value to use.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.rep
- the amount of nodes the item should be replicated to before
returning.net.spy.memcached.internal.OperationFuture<java.lang.Boolean> add(java.lang.String key, java.lang.Object value, net.spy.memcached.PersistTo req, net.spy.memcached.ReplicateTo rep)
key
- the key to store.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.rep
- the amount of nodes the item should be replicated to before
returning.net.spy.memcached.internal.OperationFuture<java.lang.Boolean> replace(java.lang.String key, java.lang.Object value)
key
- the key to store.value
- the value of the key.net.spy.memcached.internal.OperationFuture<java.lang.Boolean> replace(java.lang.String key, int exp, java.lang.Object value, net.spy.memcached.PersistTo req)
key
- the key to store.exp
- the expiry value to use.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.net.spy.memcached.internal.OperationFuture<java.lang.Boolean> replace(java.lang.String key, java.lang.Object value, net.spy.memcached.PersistTo req)
key
- the key to store.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.net.spy.memcached.internal.OperationFuture<java.lang.Boolean> replace(java.lang.String key, int exp, java.lang.Object value, net.spy.memcached.ReplicateTo rep)
key
- the key to store.exp
- the expiry value to use.value
- the value of the key.rep
- the amount of nodes the item should be replicated to before
returning.net.spy.memcached.internal.OperationFuture<java.lang.Boolean> replace(java.lang.String key, java.lang.Object value, net.spy.memcached.ReplicateTo rep)
key
- the key to store.value
- the value of the key.rep
- the amount of nodes the item should be replicated to before
returning.net.spy.memcached.internal.OperationFuture<java.lang.Boolean> replace(java.lang.String key, int exp, java.lang.Object value, net.spy.memcached.PersistTo req, net.spy.memcached.ReplicateTo rep)
key
- the key to store.exp
- the expiry value to use.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.rep
- the amount of nodes the item should be replicated to before
returning.net.spy.memcached.internal.OperationFuture<java.lang.Boolean> replace(java.lang.String key, java.lang.Object value, net.spy.memcached.PersistTo req, net.spy.memcached.ReplicateTo rep)
key
- the key to store.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.rep
- the amount of nodes the item should be replicated to before
returning.net.spy.memcached.CASResponse cas(java.lang.String key, long cas, java.lang.Object value, net.spy.memcached.PersistTo req, net.spy.memcached.ReplicateTo rep)
key
- the key to store.cas
- the CAS value to use.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.rep
- the amount of nodes the item should be replicated to before
returning.net.spy.memcached.CASResponse cas(java.lang.String key, long cas, int exp, java.lang.Object value, net.spy.memcached.PersistTo req, net.spy.memcached.ReplicateTo rep)
key
- the key to store.cas
- the CAS value to use.exp
- expiration time for the key.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.rep
- the amount of nodes the item should be replicated to before
returning.net.spy.memcached.CASResponse cas(java.lang.String key, long cas, java.lang.Object value, net.spy.memcached.PersistTo req)
key
- the key to store.cas
- the CAS value to use.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.net.spy.memcached.CASResponse cas(java.lang.String key, long cas, java.lang.Object value, net.spy.memcached.ReplicateTo rep)
key
- the key to store.cas
- the CAS value to use.value
- the value of the key.rep
- the amount of nodes the item should be replicated to before
returning.net.spy.memcached.CASResponse cas(java.lang.String key, long cas, int exp, java.lang.Object value, net.spy.memcached.PersistTo req)
key
- the key to store.cas
- the CAS value to use.exp
- the TTL of the document.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.net.spy.memcached.CASResponse cas(java.lang.String key, long cas, int exp, java.lang.Object value, net.spy.memcached.ReplicateTo rep)
key
- the key to store.cas
- the CAS value to use.exp
- the TTL of the document.value
- the value of the key.rep
- the amount of nodes the item should be replicated to before
returning.net.spy.memcached.internal.OperationFuture<net.spy.memcached.CASResponse> asyncCas(java.lang.String key, long cas, java.lang.Object value, net.spy.memcached.PersistTo req, net.spy.memcached.ReplicateTo rep)
key
- the key to store.cas
- the CAS value to use.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.rep
- the amount of nodes the item should be replicated to before
returning.net.spy.memcached.internal.OperationFuture<net.spy.memcached.CASResponse> asyncCas(java.lang.String key, long cas, java.lang.Object value, net.spy.memcached.PersistTo req)
key
- the key to store.cas
- the CAS value to use.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.java.util.concurrent.Future<net.spy.memcached.CASResponse> asyncCas(java.lang.String key, long cas, java.lang.Object value, net.spy.memcached.ReplicateTo rep)
key
- the key to store.cas
- the CAS value to use.value
- the value of the key.rep
- the amount of nodes the item should be replicated to before
returning.net.spy.memcached.internal.OperationFuture<net.spy.memcached.CASResponse> asyncCas(java.lang.String key, long cas, int exp, java.lang.Object value, net.spy.memcached.PersistTo req)
key
- the key to store.cas
- the CAS value to use.exp
- the TTL of the document.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.net.spy.memcached.internal.OperationFuture<net.spy.memcached.CASResponse> asyncCas(java.lang.String key, long cas, int exp, java.lang.Object value, net.spy.memcached.ReplicateTo rep)
key
- the key to store.cas
- the CAS value to use.exp
- the TTL of the document.value
- the value of the key.rep
- the amount of nodes the item should be replicated to before
returning.net.spy.memcached.internal.OperationFuture<net.spy.memcached.CASResponse> asyncCas(java.lang.String key, long cas, int exp, java.lang.Object value, net.spy.memcached.PersistTo req, net.spy.memcached.ReplicateTo rep)
key
- the key to store.cas
- the CAS value to use.exp
- expiration time for the key.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.rep
- the amount of nodes the item should be replicated to before
returning.net.spy.memcached.internal.OperationFuture<java.lang.Boolean> delete(java.lang.String key, net.spy.memcached.PersistTo req)
key
- the key to setreq
- the persistence option requestednet.spy.memcached.internal.OperationFuture<java.lang.Boolean> delete(java.lang.String key, net.spy.memcached.PersistTo req, net.spy.memcached.ReplicateTo rep)
key
- the key to setreq
- the Persistence to Master valuerep
- the Persistence to Replicasnet.spy.memcached.internal.OperationFuture<java.lang.Boolean> delete(java.lang.String key, net.spy.memcached.ReplicateTo req)
key
- the key to setreq
- the replication option requestedint getNumVBuckets()
HttpFuture<java.lang.Boolean> asyncCreateDesignDoc(DesignDocument doc) throws java.io.UnsupportedEncodingException
doc
- the design document to store.java.io.UnsupportedEncodingException
HttpFuture<java.lang.Boolean> asyncCreateDesignDoc(java.lang.String name, java.lang.String value) throws java.io.UnsupportedEncodingException
name
- the name of the design document.value
- the full design document definition as a string.java.io.UnsupportedEncodingException
HttpFuture<java.lang.Boolean> asyncDeleteDesignDoc(java.lang.String name) throws java.io.UnsupportedEncodingException
name
- the design document to delete.java.io.UnsupportedEncodingException
@Deprecated HttpFuture<DesignDocument> asyncGetDesignDocument(java.lang.String designDocumentName)
asyncGetDesignDoc(String)
instead.designDocumentName
- the name of the design document.HttpFuture<DesignDocument> asyncGetDesignDoc(java.lang.String designDocumentName)
designDocumentName
- the name of the design document.java.lang.Boolean createDesignDoc(DesignDocument doc)
doc
- the design document to store.java.util.concurrent.CancellationException
- if operation was canceled.java.lang.Boolean deleteDesignDoc(java.lang.String name)
name
- the design document to delete.java.util.concurrent.CancellationException
- if operation was canceled.@Deprecated DesignDocument getDesignDocument(java.lang.String designDocumentName)
getDesignDoc(String)
instead.designDocumentName
- the name of the design document.InvalidViewException
- if no design document or view was found.java.util.concurrent.CancellationException
- if operation was canceled.DesignDocument getDesignDoc(java.lang.String designDocumentName)
designDocumentName
- the name of the design document.InvalidViewException
- if no design document or view was found.java.util.concurrent.CancellationException
- if operation was canceled.java.lang.Object getFromReplica(java.lang.String key)
A replica read command "fans out" to all configured replicas and also the active node and asks them for the document. The response which arrives first at the client is used and the others are discarded. This means that the method should only be used as a fallback on failure, since it sends out potentially more than one request, leading to increased traffic if used regularly.
Important: since a response from the replica can arrive first, the code calling this method must always be prepared to get outdated results, since the data takes some time to be propagated to the replica. Use it only if availability is explicitly traded for consistency.
Replicas are only supported on couchbase buckets.
key
- the unique key of the document.net.spy.memcached.CASValue<java.lang.Object> getsFromReplica(java.lang.String key)
A replica read command "fans out" to all configured replicas and also the active node and asks them for the document. The response which arrives first at the client is used and the others are discarded. This means that the method should only be used as a fallback on failure, since it sends out potentially more than one request, leading to increased traffic if used regularly.
Important: since a response from the replica can arrive first, the code calling this method must always be prepared to get outdated results, since the data takes some time to be propagated to the replica. Use it only if availability is explicitly traded for consistency.
Replicas are only supported on couchbase buckets.
key
- the unique key of the document.<T> T getFromReplica(java.lang.String key, net.spy.memcached.transcoders.Transcoder<T> tc)
A replica read command "fans out" to all configured replicas and also the active node and asks them for the document. The response which arrives first at the client is used and the others are discarded. This means that the method should only be used as a fallback on failure, since it sends out potentially more than one request, leading to increased traffic if used regularly.
Important: since a response from the replica can arrive first, the code calling this method must always be prepared to get outdated results, since the data takes some time to be propagated to the replica. Use it only if availability is explicitly traded for consistency.
Replicas are only supported on couchbase buckets.
key
- the unique key of the document.tc
- a custom transcoder.<T> net.spy.memcached.CASValue<T> getsFromReplica(java.lang.String key, net.spy.memcached.transcoders.Transcoder<T> tc)
A replica read command "fans out" to all configured replicas and also the active node and asks them for the document. The response which arrives first at the client is used and the others are discarded. This means that the method should only be used as a fallback on failure, since it sends out potentially more than one request, leading to increased traffic if used regularly.
Important: since a response from the replica can arrive first, the code calling this method must always be prepared to get outdated results, since the data takes some time to be propagated to the replica. Use it only if availability is explicitly traded for consistency.
Replicas are only supported on couchbase buckets.
key
- the unique key of the document.tc
- a custom transcoder.ReplicaGetFuture<java.lang.Object> asyncGetFromReplica(java.lang.String key)
A replica read command "fans out" to all configured replicas and also the active node and asks them for the document. The response which arrives first at the client is used and the others are discarded. This means that the method should only be used as a fallback on failure, since it sends out potentially more than one request, leading to increased traffic if used regularly.
Important: since a response from the replica can arrive first, the code calling this method must always be prepared to get outdated results, since the data takes some time to be propagated to the replica. Use it only if availability is explicitly traded for consistency.
Replicas are only supported on couchbase buckets.
key
- the unique key of the document.ReplicaGetFuture<net.spy.memcached.CASValue<java.lang.Object>> asyncGetsFromReplica(java.lang.String key)
A replica read command "fans out" to all configured replicas and also the active node and asks them for the document. The response which arrives first at the client is used and the others are discarded. This means that the method should only be used as a fallback on failure, since it sends out potentially more than one request, leading to increased traffic if used regularly.
Important: since a response from the replica can arrive first, the code calling this method must always be prepared to get outdated results, since the data takes some time to be propagated to the replica. Use it only if availability is explicitly traded for consistency.
Replicas are only supported on couchbase buckets.
key
- the unique key of the document.<T> ReplicaGetFuture<T> asyncGetFromReplica(java.lang.String key, net.spy.memcached.transcoders.Transcoder<T> tc)
A replica read command "fans out" to all configured replicas and also the active node and asks them for the document. The response which arrives first at the client is used and the others are discarded. This means that the method should only be used as a fallback on failure, since it sends out potentially more than one request, leading to increased traffic if used regularly.
Important: since a response from the replica can arrive first, the code calling this method must always be prepared to get outdated results, since the data takes some time to be propagated to the replica. Use it only if availability is explicitly traded for consistency.
Replicas are only supported on couchbase buckets.
key
- the unique key of the document.tc
- a custom transcoder.<T> ReplicaGetFuture<net.spy.memcached.CASValue<T>> asyncGetsFromReplica(java.lang.String key, net.spy.memcached.transcoders.Transcoder<T> tc)
A replica read command "fans out" to all configured replicas and also the active node and asks them for the document. The response which arrives first at the client is used and the others are discarded. This means that the method should only be used as a fallback on failure, since it sends out potentially more than one request, leading to increased traffic if used regularly.
Important: since a response from the replica can arrive first, the code calling this method must always be prepared to get outdated results, since the data takes some time to be propagated to the replica. Use it only if availability is explicitly traded for consistency.
Replicas are only supported on couchbase buckets.
key
- the unique key of the document.tc
- a custom transcoder.HttpFuture<View> asyncGetView(java.lang.String designDocumentName, java.lang.String viewName)
designDocumentName
- the name of the design document.viewName
- the name of the view to get.java.lang.InterruptedException
- if the operation is interrupted while in
flightjava.util.concurrent.ExecutionException
- if an error occurs during executionHttpFuture<SpatialView> asyncGetSpatialView(java.lang.String designDocumentName, java.lang.String viewName)
designDocumentName
- the name of the design document.viewName
- the name of the spatial view to get.java.lang.InterruptedException
- if the operation is interrupted while in
flightjava.util.concurrent.ExecutionException
- if an error occurs during executionHttpFuture<ViewResponse> asyncQuery(AbstractView view, Query query)
ViewResponse query(AbstractView view, Query query)
view
- the view to run the query against.query
- the type of query to run against the view.java.util.concurrent.CancellationException
- if operation was canceled.Paginator paginatedQuery(View view, Query query, int docsPerPage)
view
- the view to query against.query
- the query for this request.docsPerPage
- the amount of documents per page.View getView(java.lang.String designDocumentName, java.lang.String viewName)
designDocumentName
- the name of the design document.viewName
- the name of the view to get.InvalidViewException
- if no design document or view was found.java.util.concurrent.CancellationException
- if operation was canceled.SpatialView getSpatialView(java.lang.String designDocumentName, java.lang.String viewName)
designDocumentName
- the name of the design document.viewName
- the name of the view to get.InvalidViewException
- if no design document or view was found.java.util.concurrent.CancellationException
- if operation was canceled.net.spy.memcached.internal.OperationFuture<java.util.Map<java.lang.String,java.lang.String>> getKeyStats(java.lang.String key)
Copyright © 2006-2009 Dustin Sallings, 2009-2012 Couchbase, Inc.