public class InMemoryDocumentLibrary extends Object implements DocumentLibrary, Serializable
| Constructor and Description |
|---|
InMemoryDocumentLibrary(String name) |
| Modifier and Type | Method and Description |
|---|---|
Document |
get(String key)
Get the document with the supplied key.
|
String |
getName()
Get the name of this library.
|
Document |
put(String key,
Document document)
Store the supplied document at the given key.
|
Document |
putIfAbsent(String key,
Document document)
Store the supplied document at the given key.
|
Document |
remove(String key)
Remove the existing document at the given key.
|
Document |
replace(String key,
Document document)
Replace the existing document at the given key with the document that is supplied.
|
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 documentCopyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.