public class CouchbaseClient extends net.spy.memcached.MemcachedClient implements CouchbaseClientIF, Reconfigurable
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.ExecutorService |
executorService |
static java.lang.String |
MODE_PREFIX |
protected boolean |
reconfiguring |
Constructor and Description |
---|
CouchbaseClient(CouchbaseConnectionFactory cf)
Get a CouchbaseClient based on the settings from the given
CouchbaseConnectionFactory.
|
CouchbaseClient(java.util.List<java.net.URI> baseList,
java.lang.String bucketName,
java.lang.String pwd)
Get a CouchbaseClient based on the initial server list provided.
|
CouchbaseClient(java.util.List<java.net.URI> baseList,
java.lang.String bucketName,
java.lang.String user,
java.lang.String pwd)
Get a CouchbaseClient based on the initial server list provided.
|
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.
|
protected void |
addOp(HttpOperation op)
Adds an operation to the queue where it waits to be sent to Couchbase.
|
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.
|
net.spy.memcached.internal.OperationFuture<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.
|
net.spy.memcached.internal.OperationFuture<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> net.spy.memcached.internal.OperationFuture<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)
Get a document from a replica node asynchronously.
|
<T> ReplicaGetFuture<T> |
asyncGetFromReplica(java.lang.String key,
net.spy.memcached.transcoders.Transcoder<T> tc)
Get a document from a replica node asynchronously.
|
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.
|
protected boolean |
connectionShutDown() |
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.internal.OperationFuture<java.lang.Boolean> |
flush()
Flush all data from the bucket immediately.
|
net.spy.memcached.internal.OperationFuture<java.lang.Boolean> |
flush(int delay)
Flush all caches from all servers with a delay of application.
|
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 a replica node.
|
<T> T |
getFromReplica(java.lang.String key,
net.spy.memcached.transcoders.Transcoder<T> tc)
Get a document from a replica node.
|
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.
|
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.
|
void |
reconfigure(Bucket bucket)
Call on a configuration update.
|
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.
|
boolean |
shutdown(long timeout,
java.util.concurrent.TimeUnit unit) |
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, asyncGet, asyncGet, asyncGetAndTouch, asyncGetAndTouch, asyncGetBulk, asyncGetBulk, asyncGetBulk, asyncGetBulk, asyncGetBulk, asyncGetBulk, asyncGetBulk, asyncGetBulk, asyncGets, asyncGets, asyncIncr, asyncIncr, broadcastOp, broadcastOp, cas, cas, cas, cas, connectionEstablished, connectionLost, decr, decr, decr, decr, decr, decr, delete, delete, delete, 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, toString, touch, touch, waitForQueues
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
add, add, addObserver, append, append, append, append, asyncCAS, asyncCAS, asyncCAS, asyncCAS, asyncDecr, asyncDecr, asyncGet, asyncGet, asyncGetAndTouch, asyncGetAndTouch, asyncGetBulk, asyncGetBulk, asyncGetBulk, asyncGetBulk, asyncGetBulk, asyncGetBulk, asyncGetBulk, asyncGetBulk, asyncGets, asyncGets, asyncIncr, asyncIncr, broadcastOp, broadcastOp, cas, cas, cas, cas, decr, decr, decr, decr, decr, decr, delete, delete, 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, touch, touch, waitForQueues
public static final java.lang.String MODE_PREFIX
protected volatile boolean reconfiguring
protected final java.util.concurrent.ExecutorService executorService
public CouchbaseClient(java.util.List<java.net.URI> baseList, java.lang.String bucketName, java.lang.String pwd) throws java.io.IOException
baseList
- the URI list of one or more servers from the clusterbucketName
- the bucket name in the cluster you wish to usepwd
- the password for the bucketjava.io.IOException
- if connections could not be madeConfigurationException
- if the
configuration provided by the server has issues or is not
compatible.public CouchbaseClient(java.util.List<java.net.URI> baseList, java.lang.String bucketName, java.lang.String user, java.lang.String pwd) throws java.io.IOException
baseList
- the URI list of one or more servers from the clusterbucketName
- the bucket name in the cluster you wish to useuser
- the username for the bucketpwd
- the password for the bucketjava.io.IOException
- if connections could not be madeConfigurationException
- if the
configuration provided by the server has issues or is not
compatible.public CouchbaseClient(CouchbaseConnectionFactory cf) throws java.io.IOException
cf
- the ConnectionFactory to use to create connectionsjava.io.IOException
- if connections could not be madeConfigurationException
- if the
configuration provided by the server has issues or is not
compatible.public void reconfigure(Bucket bucket)
Reconfigurable
reconfigure
in interface Reconfigurable
bucket
- updated vbucket configurationpublic HttpFuture<View> asyncGetView(java.lang.String designDocumentName, java.lang.String viewName)
CouchbaseClientIF
asyncGetView
in interface CouchbaseClientIF
designDocumentName
- the name of the design document.viewName
- the name of the view to get.public HttpFuture<SpatialView> asyncGetSpatialView(java.lang.String designDocumentName, java.lang.String viewName)
CouchbaseClientIF
asyncGetSpatialView
in interface CouchbaseClientIF
designDocumentName
- the name of the design document.viewName
- the name of the spatial view to get.public HttpFuture<DesignDocument> asyncGetDesignDoc(java.lang.String designDocumentName)
CouchbaseClientIF
asyncGetDesignDoc
in interface CouchbaseClientIF
designDocumentName
- the name of the design document.public View getView(java.lang.String designDocumentName, java.lang.String viewName)
CouchbaseClientIF
getView
in interface CouchbaseClientIF
designDocumentName
- the name of the design document.viewName
- the name of the view to get.public SpatialView getSpatialView(java.lang.String designDocumentName, java.lang.String viewName)
CouchbaseClientIF
getSpatialView
in interface CouchbaseClientIF
designDocumentName
- the name of the design document.viewName
- the name of the view to get.public DesignDocument getDesignDoc(java.lang.String designDocumentName)
CouchbaseClientIF
getDesignDoc
in interface CouchbaseClientIF
designDocumentName
- the name of the design document.@Deprecated public HttpFuture<DesignDocument> asyncGetDesignDocument(java.lang.String designDocumentName)
CouchbaseClientIF
CouchbaseClientIF.asyncGetDesignDoc(String)
instead.asyncGetDesignDocument
in interface CouchbaseClientIF
designDocumentName
- the name of the design document.@Deprecated public DesignDocument getDesignDocument(java.lang.String designDocumentName)
CouchbaseClientIF
CouchbaseClientIF.getDesignDoc(String)
instead.getDesignDocument
in interface CouchbaseClientIF
designDocumentName
- the name of the design document.public java.lang.Boolean createDesignDoc(DesignDocument doc)
CouchbaseClientIF
createDesignDoc
in interface CouchbaseClientIF
doc
- the design document to store.public HttpFuture<java.lang.Boolean> asyncCreateDesignDoc(java.lang.String name, java.lang.String value) throws java.io.UnsupportedEncodingException
CouchbaseClientIF
asyncCreateDesignDoc
in interface CouchbaseClientIF
name
- the name of the design document.value
- the full design document definition as a string.java.io.UnsupportedEncodingException
public HttpFuture<java.lang.Boolean> asyncCreateDesignDoc(DesignDocument doc) throws java.io.UnsupportedEncodingException
CouchbaseClientIF
asyncCreateDesignDoc
in interface CouchbaseClientIF
doc
- the design document to store.java.io.UnsupportedEncodingException
public java.lang.Boolean deleteDesignDoc(java.lang.String name)
CouchbaseClientIF
deleteDesignDoc
in interface CouchbaseClientIF
name
- the design document to delete.public HttpFuture<java.lang.Boolean> asyncDeleteDesignDoc(java.lang.String name) throws java.io.UnsupportedEncodingException
CouchbaseClientIF
asyncDeleteDesignDoc
in interface CouchbaseClientIF
name
- the design document to delete.java.io.UnsupportedEncodingException
public HttpFuture<ViewResponse> asyncQuery(AbstractView view, Query query)
asyncQuery
in interface CouchbaseClientIF
public ViewResponse query(AbstractView view, Query query)
CouchbaseClientIF
query
in interface CouchbaseClientIF
view
- the view to run the query against.query
- the type of query to run against the view.public Paginator paginatedQuery(View view, Query query, int docsPerPage)
CouchbaseClientIF
paginatedQuery
in interface CouchbaseClientIF
view
- the view to query against.query
- the query for this request.docsPerPage
- the amount of documents per page.protected void addOp(HttpOperation op)
public <T> net.spy.memcached.internal.OperationFuture<net.spy.memcached.CASValue<T>> asyncGetAndLock(java.lang.String key, int exp, net.spy.memcached.transcoders.Transcoder<T> tc)
CouchbaseClientIF
asyncGetAndLock
in interface CouchbaseClientIF
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 valuepublic net.spy.memcached.internal.OperationFuture<net.spy.memcached.CASValue<java.lang.Object>> asyncGetAndLock(java.lang.String key, int exp)
CouchbaseClientIF
asyncGetAndLock
in interface CouchbaseClientIF
key
- the key to fetch and lockexp
- the amount of time the lock should be valid for in seconds.public java.lang.Object getFromReplica(java.lang.String key)
CouchbaseClientIF
getFromReplica
in interface CouchbaseClientIF
key
- the key to fetch.public <T> T getFromReplica(java.lang.String key, net.spy.memcached.transcoders.Transcoder<T> tc)
CouchbaseClientIF
getFromReplica
in interface CouchbaseClientIF
key
- the key to fetch.tc
- a custom document transcoder.public ReplicaGetFuture<java.lang.Object> asyncGetFromReplica(java.lang.String key)
CouchbaseClientIF
asyncGetFromReplica
in interface CouchbaseClientIF
key
- the key to fetch.public <T> ReplicaGetFuture<T> asyncGetFromReplica(java.lang.String key, net.spy.memcached.transcoders.Transcoder<T> tc)
CouchbaseClientIF
asyncGetFromReplica
in interface CouchbaseClientIF
key
- the key to fetch.tc
- a custom document transcoder.public <T> net.spy.memcached.CASValue<T> getAndLock(java.lang.String key, int exp, net.spy.memcached.transcoders.Transcoder<T> tc)
CouchbaseClientIF
getAndLock
in interface CouchbaseClientIF
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 valuepublic net.spy.memcached.CASValue<java.lang.Object> getAndLock(java.lang.String key, int exp)
CouchbaseClientIF
getAndLock
in interface CouchbaseClientIF
key
- the key to get and lockexp
- the amount of time the lock should be valid for in seconds.public <T> net.spy.memcached.internal.OperationFuture<java.lang.Boolean> asyncUnlock(java.lang.String key, long casId, net.spy.memcached.transcoders.Transcoder<T> tc)
CouchbaseClientIF
asyncUnlock
in interface CouchbaseClientIF
key
- the key to unlockcasId
- the CAS identifiertc
- the transcoder to serialize and unserialize valuepublic net.spy.memcached.internal.OperationFuture<java.lang.Boolean> asyncUnlock(java.lang.String key, long casId)
CouchbaseClientIF
asyncUnlock
in interface CouchbaseClientIF
key
- the key to unlockcasId
- the CAS identifierpublic <T> java.lang.Boolean unlock(java.lang.String key, long casId, net.spy.memcached.transcoders.Transcoder<T> tc)
CouchbaseClientIF
unlock
in interface CouchbaseClientIF
key
- the key to unlockcasId
- the CAS identifiertc
- the transcoder to serialize and unserialize valuepublic java.lang.Boolean unlock(java.lang.String key, long casId)
CouchbaseClientIF
unlock
in interface CouchbaseClientIF
key
- the key to unlockcasId
- the CAS identifierpublic net.spy.memcached.internal.OperationFuture<java.lang.Boolean> delete(java.lang.String key, net.spy.memcached.PersistTo req, net.spy.memcached.ReplicateTo rep)
CouchbaseClientIF
delete
in interface CouchbaseClientIF
key
- the key to setreq
- the Persistence to Master valuerep
- the Persistence to Replicaspublic net.spy.memcached.internal.OperationFuture<java.lang.Boolean> delete(java.lang.String key, net.spy.memcached.PersistTo req)
CouchbaseClientIF
delete
in interface CouchbaseClientIF
key
- the key to setreq
- the persistence option requestedpublic net.spy.memcached.internal.OperationFuture<java.lang.Boolean> delete(java.lang.String key, net.spy.memcached.ReplicateTo req)
CouchbaseClientIF
delete
in interface CouchbaseClientIF
key
- the key to setreq
- the replication option requestedpublic net.spy.memcached.internal.OperationFuture<java.lang.Boolean> set(java.lang.String key, java.lang.Object value)
CouchbaseClientIF
set
in interface CouchbaseClientIF
key
- the key to store.value
- the value of the key.public 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)
CouchbaseClientIF
set
in interface CouchbaseClientIF
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.public 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)
CouchbaseClientIF
set
in interface CouchbaseClientIF
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.public net.spy.memcached.internal.OperationFuture<java.lang.Boolean> add(java.lang.String key, java.lang.Object value)
CouchbaseClientIF
add
in interface CouchbaseClientIF
key
- the key to store.value
- the value of the key.public net.spy.memcached.internal.OperationFuture<java.lang.Boolean> set(java.lang.String key, int exp, java.lang.Object value, net.spy.memcached.PersistTo req)
CouchbaseClientIF
set
in interface CouchbaseClientIF
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.public net.spy.memcached.internal.OperationFuture<java.lang.Boolean> set(java.lang.String key, java.lang.Object value, net.spy.memcached.PersistTo req)
CouchbaseClientIF
set
in interface CouchbaseClientIF
key
- the key to store.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.public net.spy.memcached.internal.OperationFuture<java.lang.Boolean> set(java.lang.String key, int exp, java.lang.Object value, net.spy.memcached.ReplicateTo rep)
CouchbaseClientIF
set
in interface CouchbaseClientIF
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.public net.spy.memcached.internal.OperationFuture<java.lang.Boolean> set(java.lang.String key, java.lang.Object value, net.spy.memcached.ReplicateTo rep)
CouchbaseClientIF
set
in interface CouchbaseClientIF
key
- the key to store.value
- the value of the key.rep
- the amount of nodes the item should be replicated to before
returning.public 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)
CouchbaseClientIF
add
in interface CouchbaseClientIF
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.public 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)
CouchbaseClientIF
add
in interface CouchbaseClientIF
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.public net.spy.memcached.internal.OperationFuture<java.lang.Boolean> replace(java.lang.String key, java.lang.Object value)
CouchbaseClientIF
replace
in interface CouchbaseClientIF
key
- the key to store.value
- the value of the key.public net.spy.memcached.internal.OperationFuture<java.lang.Boolean> add(java.lang.String key, int exp, java.lang.Object value, net.spy.memcached.PersistTo req)
CouchbaseClientIF
add
in interface CouchbaseClientIF
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.public net.spy.memcached.internal.OperationFuture<java.lang.Boolean> add(java.lang.String key, java.lang.Object value, net.spy.memcached.PersistTo req)
CouchbaseClientIF
add
in interface CouchbaseClientIF
key
- the key to store.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.public net.spy.memcached.internal.OperationFuture<java.lang.Boolean> add(java.lang.String key, int exp, java.lang.Object value, net.spy.memcached.ReplicateTo rep)
CouchbaseClientIF
add
in interface CouchbaseClientIF
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.public net.spy.memcached.internal.OperationFuture<java.lang.Boolean> add(java.lang.String key, java.lang.Object value, net.spy.memcached.ReplicateTo rep)
CouchbaseClientIF
add
in interface CouchbaseClientIF
key
- the key to store.value
- the value of the key.rep
- the amount of nodes the item should be replicated to before
returning.public 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)
CouchbaseClientIF
replace
in interface CouchbaseClientIF
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.public 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)
CouchbaseClientIF
replace
in interface CouchbaseClientIF
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.public net.spy.memcached.internal.OperationFuture<java.lang.Boolean> replace(java.lang.String key, int exp, java.lang.Object value, net.spy.memcached.PersistTo req)
CouchbaseClientIF
replace
in interface CouchbaseClientIF
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.public net.spy.memcached.internal.OperationFuture<java.lang.Boolean> replace(java.lang.String key, java.lang.Object value, net.spy.memcached.PersistTo req)
CouchbaseClientIF
replace
in interface CouchbaseClientIF
key
- the key to store.value
- the value of the key.req
- the amount of nodes the item should be persisted to before
returning.public net.spy.memcached.internal.OperationFuture<java.lang.Boolean> replace(java.lang.String key, int exp, java.lang.Object value, net.spy.memcached.ReplicateTo rep)
CouchbaseClientIF
replace
in interface CouchbaseClientIF
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.public net.spy.memcached.internal.OperationFuture<java.lang.Boolean> replace(java.lang.String key, java.lang.Object value, net.spy.memcached.ReplicateTo rep)
CouchbaseClientIF
replace
in interface CouchbaseClientIF
key
- the key to store.value
- the value of the key.rep
- the amount of nodes the item should be replicated to before
returning.public 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)
CouchbaseClientIF
cas
in interface CouchbaseClientIF
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.public 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)
CouchbaseClientIF
cas
in interface CouchbaseClientIF
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.public net.spy.memcached.CASResponse cas(java.lang.String key, long cas, java.lang.Object value, net.spy.memcached.PersistTo req)
CouchbaseClientIF
cas
in interface CouchbaseClientIF
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.public net.spy.memcached.CASResponse cas(java.lang.String key, long cas, int exp, java.lang.Object value, net.spy.memcached.PersistTo req)
CouchbaseClientIF
cas
in interface CouchbaseClientIF
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.public net.spy.memcached.CASResponse cas(java.lang.String key, long cas, java.lang.Object value, net.spy.memcached.ReplicateTo rep)
CouchbaseClientIF
cas
in interface CouchbaseClientIF
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.public net.spy.memcached.CASResponse cas(java.lang.String key, long cas, int exp, java.lang.Object value, net.spy.memcached.ReplicateTo rep)
CouchbaseClientIF
cas
in interface CouchbaseClientIF
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.public 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)
CouchbaseClientIF
asyncCas
in interface CouchbaseClientIF
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.public 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)
CouchbaseClientIF
asyncCas
in interface CouchbaseClientIF
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.public net.spy.memcached.internal.OperationFuture<net.spy.memcached.CASResponse> asyncCas(java.lang.String key, long cas, java.lang.Object value, net.spy.memcached.ReplicateTo rep)
CouchbaseClientIF
asyncCas
in interface CouchbaseClientIF
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.public 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)
CouchbaseClientIF
asyncCas
in interface CouchbaseClientIF
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.public 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)
CouchbaseClientIF
asyncCas
in interface CouchbaseClientIF
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.public 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)
CouchbaseClientIF
asyncCas
in interface CouchbaseClientIF
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.public java.util.Map<net.spy.memcached.MemcachedNode,net.spy.memcached.ObserveResponse> observe(java.lang.String key, long cas)
CouchbaseClientIF
observe
in interface CouchbaseClientIF
key
- the key to observe.cas
- the CAS of the key (0 will ignore it).public int getNumVBuckets()
CouchbaseClientIF
getNumVBuckets
in interface CouchbaseClientIF
public boolean shutdown(long timeout, java.util.concurrent.TimeUnit unit)
shutdown
in interface net.spy.memcached.MemcachedClientIF
shutdown
in class net.spy.memcached.MemcachedClient
public void observePoll(java.lang.String key, long cas, net.spy.memcached.PersistTo persist, net.spy.memcached.ReplicateTo replicate, boolean isDelete)
CouchbaseClientIF
observePoll
in interface CouchbaseClientIF
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.public net.spy.memcached.internal.OperationFuture<java.util.Map<java.lang.String,java.lang.String>> getKeyStats(java.lang.String key)
getKeyStats
in interface CouchbaseClientIF
public net.spy.memcached.internal.OperationFuture<java.lang.Boolean> flush()
flush
in interface net.spy.memcached.MemcachedClientIF
flush
in class net.spy.memcached.MemcachedClient
public net.spy.memcached.internal.OperationFuture<java.lang.Boolean> flush(int delay)
flush
in interface net.spy.memcached.MemcachedClientIF
flush
in class net.spy.memcached.MemcachedClient
delay
- the period of time to delay, in secondsprotected boolean connectionShutDown()
Copyright © 2006-2009 Dustin Sallings, 2009-2012 Couchbase, Inc.