|
ModeShape Distribution 3.2.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.infinispan.schematic.internal.CacheSchematicDb
public class CacheSchematicDb
| Nested Class Summary | |
|---|---|
protected static class |
CacheSchematicDb.ResultsCollector
|
protected class |
CacheSchematicDb.SchematicEntryProxyFuture
|
| Constructor Summary | |
|---|---|
CacheSchematicDb(org.infinispan.Cache<String,SchematicEntry> store)
|
|
| Method Summary | |
|---|---|
boolean |
containsKey(String key)
Determine whether the database contains an entry with the supplied key. |
protected CacheSchematicDb.SchematicEntryProxyFuture |
future(String key,
org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> future,
boolean isRemoved)
|
SchematicEntry |
get(String key)
Get the entry with the supplied key. |
org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> |
getAsync(String key)
Asynchronous version of SchematicDb.get(String). |
org.infinispan.Cache<String,SchematicEntry> |
getCache()
Get the cache that backs this schematic database. |
String |
getDescription()
Get the description of this database. |
String |
getName()
Get the name of this database. |
SchemaLibrary |
getSchemaLibrary()
Get the reference to the SchemaLibrary for this database. |
boolean |
isExplicitLockingEnabled()
Return whether explicit locking is used when editing document content or metadata. |
boolean |
lock(Collection<String> keys)
Lock all of the documents with the given keys. |
protected SchematicEntry |
proxy(String key,
SchematicEntry entry)
|
SchematicEntry |
put(Document entryDocument)
Store the supplied document and metadata at the given key. |
SchematicEntry |
put(String key,
Binary binaryContent,
Document metadata)
Store the supplied binary value and metadata at the given key. |
SchematicEntry |
put(String key,
Document document,
Document metadata)
Store the supplied document and metadata at the given key. |
org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> |
putAsync(String key,
Binary binaryContent,
Document metadata)
Asynchronous version of SchematicDb.put(String, Binary, Document). |
org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> |
putAsync(String key,
Document document,
Document metadata)
Asynchronous version of SchematicDb.put(String, Document, Document). |
SchematicEntry |
putIfAbsent(Document entryDocument)
Store the supplied document and metadata at the given key. |
SchematicEntry |
putIfAbsent(String key,
Binary binaryContent,
Document metadata)
Store the supplied document and metadata at the given key. |
SchematicEntry |
putIfAbsent(String key,
Document document,
Document metadata)
Store the supplied document and metadata at the given key. |
org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> |
putIfAbsentAsync(String key,
Binary binaryContent,
Document metadata)
Asynchronous version of SchematicDb.putIfAbsent(String, Binary, Document). |
org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> |
putIfAbsentAsync(String key,
Document document,
Document metadata)
Asynchronous version of SchematicDb.putIfAbsent(String, Document, Document). |
SchematicEntry |
remove(String key)
Remove the existing document at the given key. |
org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> |
removeAsync(String key)
Asynchronous version of SchematicDb.remove(String). |
protected SchematicEntry |
removedResult(String key,
SchematicEntry entry)
|
SchematicEntry |
replace(String key,
Binary binaryContent,
Document metadata)
Replace the existing document and metadata at the given key with the document that is supplied. |
SchematicEntry |
replace(String key,
Document document,
Document metadata)
Replace the existing document and metadata at the given key with the document that is supplied. |
org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> |
replaceAsync(String key,
Binary binaryContent,
Document metadata)
Asynchronous version of SchematicDb.replace(String, Binary, Document). |
org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> |
replaceAsync(String key,
Document document,
Document metadata)
Asynchronous version of SchematicDb.replace(String, Document, Document). |
protected CacheSchemaLibrary |
schemaLibrary(boolean createIfMissing)
|
void |
start()
|
void |
stop()
|
SchemaLibrary.Results |
validate(String key)
Validate the JSON document store at the specified key. |
Map<String,SchemaLibrary.Results> |
validate(String firstKey,
String... additionalKeys)
Execute a Map-Reduce task to validate all JSON documents stored within this database, using this database's JSON Schema library. |
Map<String,SchemaLibrary.Results> |
validateAll()
Validate all JSON documents stored within this database, using this database's JSON Schema
library. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CacheSchematicDb(org.infinispan.Cache<String,SchematicEntry> store)
| Method Detail |
|---|
public String getName()
SchematicDb
getName in interface SchematicDbpublic String getDescription()
SchematicDb
getDescription in interface SchematicDbpublic org.infinispan.Cache<String,SchematicEntry> getCache()
SchematicDb
getCache in interface SchematicDbpublic void start()
start in interface org.infinispan.lifecycle.Lifecyclepublic void stop()
stop in interface org.infinispan.lifecycle.Lifecyclepublic SchemaLibrary getSchemaLibrary()
SchematicDb
getSchemaLibrary in interface SchematicDbprotected CacheSchemaLibrary schemaLibrary(boolean createIfMissing)
public Map<String,SchemaLibrary.Results> validateAll()
SchematicDbJSON Schema
library. This method works even when the database is distributed, and it blocks until the task is completed.
validateAll in interface SchematicDb
public Map<String,SchemaLibrary.Results> validate(String firstKey,
String... additionalKeys)
SchematicDbJSON Schema library. This method works even when the database is distributed, and it blocks
until the task is completed.
validate in interface SchematicDbfirstKey - the first key of the document that is to be validatedadditionalKeys - the additional keys of the documents that are to be validated
public SchemaLibrary.Results validate(String key)
SchematicDb
validate in interface SchematicDbkey - the key or identifier for the document
protected SchematicEntry proxy(String key,
SchematicEntry entry)
protected SchematicEntry removedResult(String key,
SchematicEntry entry)
protected CacheSchematicDb.SchematicEntryProxyFuture future(String key,
org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> future,
boolean isRemoved)
public SchematicEntry get(String key)
SchematicDb
get in interface SchematicDbkey - the key or identifier for the document
public boolean containsKey(String key)
SchematicDb
containsKey in interface SchematicDbkey - the key or identifier for the document
public SchematicEntry put(String key,
Document document,
Document metadata)
SchematicDb
put in interface SchematicDbkey - the key or identifier for the documentdocument - the document that is to be storedmetadata - the metadata that is to be stored; may be null if there is no metadata
SchematicDb.put(String, Binary, Document),
SchematicDb.putIfAbsent(String, Binary, Document),
SchematicDb.putIfAbsent(String, Document, Document)
public SchematicEntry put(String key,
Binary binaryContent,
Document metadata)
SchematicDb
put in interface SchematicDbkey - the key or identifier for the documentbinaryContent - the binary content that is to be storedmetadata - the metadata that is to be stored; may be null if there is no metadata
public SchematicEntry put(Document entryDocument)
SchematicDb
put in interface SchematicDbentryDocument - the document that contains the metadata document, content document, and key
SchematicDb.put(String, Binary, Document),
SchematicDb.putIfAbsent(String, Binary, Document),
SchematicDb.putIfAbsent(String, Document, Document)
public SchematicEntry putIfAbsent(String key,
Document document,
Document metadata)
SchematicDb
putIfAbsent in interface SchematicDbkey - the key or identifier for the documentdocument - the document that is to be storedmetadata - the metadata that is to be stored; may be null if there is no metadata
public SchematicEntry putIfAbsent(String key,
Binary binaryContent,
Document metadata)
SchematicDb
putIfAbsent in interface SchematicDbkey - the key or identifier for the documentbinaryContent - the binary content that is to be storedmetadata - the metadata that is to be stored; may be null if there is no metadata
public SchematicEntry putIfAbsent(Document entryDocument)
SchematicDb
putIfAbsent in interface SchematicDbentryDocument - the document that contains the metadata document, content document, and key
SchematicDb.put(String, Binary, Document),
SchematicDb.putIfAbsent(String, Binary, Document),
SchematicDb.putIfAbsent(String, Document, Document)
public SchematicEntry replace(String key,
Document document,
Document metadata)
SchematicDb
replace in interface SchematicDbkey - the key or identifier for the documentdocument - the new document that is to replace the existing document (or binary content)metadata - the metadata that is to be stored with the replacement document; may be null if there is no metadata for
the replacement
public SchematicEntry replace(String key,
Binary binaryContent,
Document metadata)
SchematicDb
replace in interface SchematicDbkey - the key or identifier for the documentbinaryContent - the binary content that is to replace the existing binary content (or document)metadata - the metadata that is to be stored with the replacement content; may be null if there is no metadata for the
replacement
public SchematicEntry remove(String key)
SchematicDb
remove in interface SchematicDbkey - the key or identifier for the document
public org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> getAsync(String key)
SchematicDbSchematicDb.get(String). This method does not block on remote calls, even if the library cache mode is
synchronous.
getAsync in interface SchematicDbkey - the key or identifier for the document
public org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> putAsync(String key,
Document document,
Document metadata)
SchematicDbSchematicDb.put(String, Document, Document). This method does not block on remote calls, even if the
library cache mode is synchronous.
putAsync in interface SchematicDbkey - the key or identifier for the documentdocument - the document that is to be storedmetadata - the metadata that is to be stored; may be null if there is no metadata
public org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> putAsync(String key,
Binary binaryContent,
Document metadata)
SchematicDbSchematicDb.put(String, Binary, Document). This method does not block on remote calls, even if the
library cache mode is synchronous.
putAsync in interface SchematicDbkey - the key or identifier for the documentbinaryContent - the binary content that is to be storedmetadata - the metadata that is to be stored; may be null if there is no metadata
public org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> putIfAbsentAsync(String key,
Document document,
Document metadata)
SchematicDbSchematicDb.putIfAbsent(String, Document, Document). This method does not block on remote calls, even
putIfAbsentAsync in interface SchematicDbkey - the key or identifier for the documentdocument - the document that is to be storedmetadata - the metadata that is to be stored; may be null if there is no metadata
public org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> putIfAbsentAsync(String key,
Binary binaryContent,
Document metadata)
SchematicDbSchematicDb.putIfAbsent(String, Binary, Document). This method does not block on remote calls, even
putIfAbsentAsync in interface SchematicDbkey - the key or identifier for the documentbinaryContent - the binary content that is to be storedmetadata - the metadata that is to be stored; may be null if there is no metadata
public org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> replaceAsync(String key,
Document document,
Document metadata)
SchematicDbSchematicDb.replace(String, Document, Document). This method does not block on remote calls, even if
the library cache mode is synchronous.
replaceAsync in interface SchematicDbkey - the key or identifier for the documentdocument - the new document that is to replace the existing document (or binary content)metadata - the metadata that is to be stored with the replacement document; may be null if there is no metadata for
the replacement
public org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> replaceAsync(String key,
Binary binaryContent,
Document metadata)
SchematicDbSchematicDb.replace(String, Binary, Document). This method does not block on remote calls, even if the
library cache mode is synchronous.
replaceAsync in interface SchematicDbkey - the key or identifier for the documentbinaryContent - the new binary content that is to replace the existing content (or document)metadata - the metadata that is to be stored with the replacement document; may be null if there is no metadata for
the replacement
public org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> removeAsync(String key)
SchematicDbSchematicDb.remove(String). This method does not block on remote calls, even if the library cache mode
is synchronous.
removeAsync in interface SchematicDbkey - the key or identifier for the document
public boolean lock(Collection<String> keys)
SchematicDb
lock in interface SchematicDbkeys - the set of keys identifying the documents that are to be locked
public boolean isExplicitLockingEnabled()
SchematicDblocking is used when editing document content or metadata. If this method returns true, then it may be useful to
preemptively lock documents that will be modified during a transactions.
isExplicitLockingEnabled in interface SchematicDb
|
ModeShape Distribution 3.2.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||