Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.infinispan.schematic
Interface SchematicDb

All Superinterfaces:
  org.infinispan.lifecycle.Lifecycle

All Known Implementing Classes:
  CacheSchematicDb

    public interface SchematicDb

extends org.infinispan.lifecycle.Lifecycle

A store for JSON documents and other binary content, plus a library of JSON Schema documents used to describe and validate the stored documents.

Since:
  5.1
Author:
  Randall Hauch (C) 2011 Red Hat Inc.

Method Summary
`boolean` | `containsKey(String key)` Determine whether the database contains an entry with the supplied key.
`SchematicEntry` | `get(String key)` Get the entry with the supplied key.
`org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry>` | `getAsync(String key)` Asynchronous version of `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.
`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 `put(String, Binary, Document)`.
`org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry>` | `putAsync(String key, Document document, Document metadata)` Asynchronous version of `put(String, Document, Document)`.
`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 `putIfAbsent(String, Binary, Document)`.
`org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry>` | `putIfAbsentAsync(String key, Document document, Document metadata)` Asynchronous version of `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 `remove(String)`.
`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 `replace(String, Binary, Document)`.
`org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry>` | `replaceAsync(String key, Document document, Document metadata)` Asynchronous version of `replace(String, Document, Document)`.
`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 interface org.infinispan.lifecycle.Lifecycle
`start, stop`

Method Detail

### getName

    String getName()

  Get the name of this database.

  Returns:
    the library name; never null

### getDescription

    String getDescription()

  Get the description of this database.

  Returns:
    the library description; never null

### getSchemaLibrary

    SchemaLibrary getSchemaLibrary()

  Get the reference to the SchemaLibrary for this database.

  Returns:
    the schema library; never null

### getCache

    org.infinispan.Cache<String,SchematicEntry> getCache()

  Get the cache that backs this schematic database.

  Returns:
    the Infinispan cache; never null

### validateAll

    Map<String,SchemaLibrary.Results> validateAll()

  Validate all JSON documents stored within this database, using this database's `JSON Schema library`. This method works even when the database is distributed, and it blocks until the task is completed.

  Returns:
    the map of document keys to validation results for all of the JSON documents in the database that are affiliated with a schema and that had at least one validation error or warning

### validate

    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`. This method works even when the database is distributed, and it blocks until the task is completed.

  Parameters:
    `firstKey` - the first key of the document that is to be validated
    `additionalKeys` - the additional keys of the documents that are to be validated
  Returns:
    the map of document keys to validation results for all of the JSON documents in the database that are affiliated with a schema and that had at least one validation error or warning

### validate

    SchemaLibrary.Results validate(String key)

  Validate the JSON document store at the specified key.

  Parameters:
    `key` - the key or identifier for the document
  Returns:
    the validation results; or null if there is no JSON document for the given key

### get

    SchematicEntry get(String key)

  Get the entry with the supplied key.

  Parameters:
    `key` - the key or identifier for the document
  Returns:
    the entry, or null if there was no document with the supplied key

### containsKey

    boolean containsKey(String key)

  Determine whether the database contains an entry with the supplied key.

  Parameters:
    `key` - the key or identifier for the document
  Returns:
    true if the database contains an entry with this key, or false otherwise

### put

    SchematicEntry put(String key,
                       Document document,
                       Document metadata)

  Store the supplied document and metadata at the given key.

  Parameters:
    `key` - the key or identifier for the document
    `document` - the document that is to be stored
    `metadata` - the metadata that is to be stored; may be null if there is no metadata
  Returns:
    the entry previously stored at this key, or null if there was no entry with the supplied key
  See Also:
    `put(String, Binary, Document)`, `putIfAbsent(String, Binary, Document)`, `putIfAbsent(String, Document, Document)`

### put

    SchematicEntry put(String key,
                       Binary binaryContent,
                       Document metadata)

  Store the supplied binary value and metadata at the given key.

  Parameters:
    `key` - the key or identifier for the document
    `binaryContent` - the binary content that is to be stored
    `metadata` - the metadata that is to be stored; may be null if there is no metadata
  Returns:
    the entry that was previously stored at this key, or null if there was no entry with the supplied key

### putIfAbsent

    SchematicEntry putIfAbsent(String key,
                               Document document,
                               Document metadata)

  Store the supplied document and metadata at the given key.

  Parameters:
    `key` - the key or identifier for the document
    `document` - the document that is to be stored
    `metadata` - the metadata that is to be stored; may be null if there is no metadata
  Returns:
    the existing entry for the supplied key, or null if there was no entry and the put was successful

### putIfAbsent

    SchematicEntry putIfAbsent(String key,
                               Binary binaryContent,
                               Document metadata)

  Store the supplied document and metadata at the given key.

  Parameters:
    `key` - the key or identifier for the document
    `binaryContent` - the binary content that is to be stored
    `metadata` - the metadata that is to be stored; may be null if there is no metadata
  Returns:
    the existing entry for the supplied key, or null if there was no entry and the put was successful

### replace

    SchematicEntry replace(String key,
                           Document document,
                           Document metadata)

  Replace the existing document and metadata at the given key with the document that is supplied. This method does nothing if there is not an existing entry at the given key.

  Parameters:
    `key` - the key or identifier for the document
    `document` - 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
  Returns:
    the entry that was replaced, or null if nothing was replaced

### replace

    SchematicEntry replace(String key,
                           Binary binaryContent,
                           Document metadata)

  Replace the existing document and metadata at the given key with the document that is supplied. This method does nothing if there is not an existing document at the given key.

  Parameters:
    `key` - the key or identifier for the document
    `binaryContent` - 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
  Returns:
    the entry that was replaced, or null if nothing was replaced

### remove

    SchematicEntry remove(String key)

  Remove the existing document at the given key.

  Parameters:
    `key` - the key or identifier for the document
  Returns:
    the entry that was removed, or null if there was no document with the supplied key

### getAsync

    org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> getAsync(String key)

  Asynchronous version of `get(String)`. This method does not block on remote calls, even if the library cache mode is synchronous.

  Parameters:
    `key` - the key or identifier for the document
  Returns:
    a future containing the entry at the given key; never null

### putAsync

    org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> putAsync(String key,
                                                                            Document document,
                                                                            Document metadata)

  Asynchronous version of `put(String, Document, Document)`. This method does not block on remote calls, even if the library cache mode is synchronous.

  Parameters:
    `key` - the key or identifier for the document
    `document` - the document that is to be stored
    `metadata` - the metadata that is to be stored; may be null if there is no metadata
  Returns:
    a future containing the old document that was previously stored at this key; never null

### putAsync

    org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> putAsync(String key,
                                                                            Binary binaryContent,
                                                                            Document metadata)

  Asynchronous version of `put(String, Binary, Document)`. This method does not block on remote calls, even if the library cache mode is synchronous.

  Parameters:
    `key` - the key or identifier for the document
    `binaryContent` - the binary content that is to be stored
    `metadata` - the metadata that is to be stored; may be null if there is no metadata
  Returns:
    a future containing the old document that was previously stored at this key; never null

### putIfAbsentAsync

    org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> putIfAbsentAsync(String key,
                                                                                    Document document,
                                                                                    Document metadata)

  Asynchronous version of `putIfAbsent(String, Document, Document)`. This method does not block on remote calls, even

  Parameters:
    `key` - the key or identifier for the document
    `document` - the document that is to be stored
    `metadata` - the metadata that is to be stored; may be null if there is no metadata
  Returns:
    a future containing the existing document, or the null if there was no existing document at the supplied key

### putIfAbsentAsync

    org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> putIfAbsentAsync(String key,
                                                                                    Binary binaryContent,
                                                                                    Document metadata)

  Asynchronous version of `putIfAbsent(String, Binary, Document)`. This method does not block on remote calls, even

  Parameters:
    `key` - the key or identifier for the document
    `binaryContent` - the binary content that is to be stored
    `metadata` - the metadata that is to be stored; may be null if there is no metadata
  Returns:
    a future containing the existing document, or the null if there was no existing document at the supplied key

### replaceAsync

    org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> replaceAsync(String key,
                                                                                Document document,
                                                                                Document metadata)

  Asynchronous version of `replace(String, Document, Document)`. This method does not block on remote calls, even if the library cache mode is synchronous.

  Parameters:
    `key` - the key or identifier for the document
    `document` - 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
  Returns:
    a future containing the entry that was replaced; never null

### replaceAsync

    org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> replaceAsync(String key,
                                                                                Binary binaryContent,
                                                                                Document metadata)

  Asynchronous version of `replace(String, Binary, Document)`. This method does not block on remote calls, even if the library cache mode is synchronous.

  Parameters:
    `key` - the key or identifier for the document
    `binaryContent` - 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
  Returns:
    a future containing the entry that was replaced; never null

### removeAsync

    org.infinispan.util.concurrent.NotifyingFuture<SchematicEntry> removeAsync(String key)

  Asynchronous version of `remove(String)`. This method does not block on remote calls, even if the library cache mode is synchronous.

  Parameters:
    `key` - the key or identifier for the document
  Returns:
    a future containing the old entry that was removed; never null

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.