public class InMemoryDocumentLibrary extends Object implements DocumentLibrary, Serializable
| Modifier and Type | Class and Description |
|---|---|
protected static class |
InMemoryDocumentLibrary.ImmediateFuture |
| Constructor and Description |
|---|
InMemoryDocumentLibrary(String name) |
| Modifier and Type | Method and Description |
|---|---|
Document |
get(String key)
Get the document with the supplied key.
|
org.infinispan.util.concurrent.NotifyingFuture<Document> |
getAsync(String key)
Asynchronous version of
DocumentLibrary.get(String). |
String |
getName()
Get the name of this library.
|
Document |
put(String key,
Document document)
Store the supplied document at the given key.
|
org.infinispan.util.concurrent.NotifyingFuture<Document> |
putAsync(String key,
Document document)
Asynchronous version of
DocumentLibrary.put(String, Document). |
Document |
putIfAbsent(String key,
Document document)
Store the supplied document at the given key.
|
org.infinispan.util.concurrent.NotifyingFuture<Document> |
putIfAbsentAsync(String key,
Document document)
Asynchronous version of
DocumentLibrary.putIfAbsent(String, Document). |
Document |
remove(String key)
Remove the existing document at the given key.
|
org.infinispan.util.concurrent.NotifyingFuture<Document> |
removeAsync(String key)
Asynchronous version of
DocumentLibrary.remove(String). |
Document |
replace(String key,
Document document)
Replace the existing document at the given key with the document that is supplied.
|
org.infinispan.util.concurrent.NotifyingFuture<Document> |
replaceAsync(String key,
Document document)
Asynchronous version of
DocumentLibrary.replace(String, Document). |
public InMemoryDocumentLibrary(String name)
public String getName()
DocumentLibrarygetName in interface DocumentLibrarypublic Document get(String key)
DocumentLibraryget in interface DocumentLibrarykey - the key or identifier for the documentpublic Document put(String key, Document document)
DocumentLibraryput in interface DocumentLibrarykey - the key or identifier for the documentdocument - the document that is to be storedpublic Document putIfAbsent(String key, Document document)
DocumentLibraryputIfAbsent in interface DocumentLibrarykey - the key or identifier for the documentdocument - the document that is to be storedpublic Document replace(String key, Document document)
DocumentLibraryreplace in interface DocumentLibrarykey - the key or identifier for the documentdocument - the document that is to replace the existing documentpublic Document remove(String key)
DocumentLibraryremove in interface DocumentLibrarykey - the key or identifier for the documentpublic org.infinispan.util.concurrent.NotifyingFuture<Document> getAsync(String key)
DocumentLibraryDocumentLibrary.get(String). This method does not block on remote calls, even if the library
cache mode is synchronous.getAsync in interface DocumentLibrarykey - the key or identifier for the documentpublic org.infinispan.util.concurrent.NotifyingFuture<Document> putAsync(String key, Document document)
DocumentLibraryDocumentLibrary.put(String, Document). This method does not block on remote calls, even if the
library cache mode is synchronous.putAsync in interface DocumentLibrarykey - the key or identifier for the documentdocument - the document that is to be storedpublic org.infinispan.util.concurrent.NotifyingFuture<Document> putIfAbsentAsync(String key, Document document)
DocumentLibraryDocumentLibrary.putIfAbsent(String, Document). This method does not block on remote calls, even
if the library cache mode is synchronous.putIfAbsentAsync in interface DocumentLibrarykey - the key or identifier for the documentdocument - the document that is to be storedpublic org.infinispan.util.concurrent.NotifyingFuture<Document> replaceAsync(String key, Document document)
DocumentLibraryDocumentLibrary.replace(String, Document). This method does not block on remote calls, even if
the library cache mode is synchronous.replaceAsync in interface DocumentLibrarykey - the key or identifier for the documentdocument - the document that is to be storedpublic org.infinispan.util.concurrent.NotifyingFuture<Document> removeAsync(String key)
DocumentLibraryDocumentLibrary.remove(String). This method does not block on remote calls, even if the library
cache mode is synchronous.removeAsync in interface DocumentLibrarykey - the key or identifier for the documentCopyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.