ModeShape Distribution 3.6.0.Final

org.infinispan.schematic
Class Schematic

java.lang.Object
  extended by org.infinispan.schematic.DocumentFactory
      extended by org.infinispan.schematic.Schematic

public class Schematic
extends DocumentFactory


Nested Class Summary
static interface Schematic.ContentTypes
           
protected static class Schematic.DocumentChanges
           
protected static class Schematic.EditorImpl
           
 
Field Summary
 
Fields inherited from class org.infinispan.schematic.DocumentFactory
DEFAULT_FACTORY
 
Constructor Summary
Schematic()
           
 
Method Summary
static SchemaLibrary createSchemaLibrary()
          Create an in-memory schema library.
static SchemaLibrary createSchemaLibrary(String name)
          Create an in-memory schema library.
static Editor editDocument(Document document, boolean clone)
          Obtain an editor for the supplied document.
static org.infinispan.marshall.AdvancedExternalizer<Object>[] externalizers()
          Get the set of Externalizer implementations that are used by Schematic.
static Set<? extends org.infinispan.marshall.AdvancedExternalizer<?>> externalizerSet()
          Get the complete set of AdvancedExternalizer implementations.
static SchematicDb get(org.infinispan.manager.CacheContainer cacheContainer, String cacheName)
          Get the SchematicDb instance given the cache name and container.
 
Methods inherited from class org.infinispan.schematic.DocumentFactory
newArray, newArray, newArray, newArray, newDocument, newDocument, newDocument, newDocument, newDocument, newDocument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Schematic

public Schematic()
Method Detail

get

public static SchematicDb get(org.infinispan.manager.CacheContainer cacheContainer,
                              String cacheName)
Get the SchematicDb instance given the cache name and container.

Parameters:
cacheContainer - the container for the named cache; may not be null
cacheName - the name of the cache; may not be null
Returns:
the schematic database instance; never null

editDocument

public static Editor editDocument(Document document,
                                  boolean clone)
Obtain an editor for the supplied document. The editor allows the caller to make changes to the document and to obtain these changes as a serializable memento that can be applied to another document.

Parameters:
document - the document to be edited
clone - true if the editor should operate against a clone of the document, or false if it should operate against the supplied document
Returns:
the editor for the document

createSchemaLibrary

public static SchemaLibrary createSchemaLibrary()
Create an in-memory schema library.

Returns:
the empty, in-memory schema library

createSchemaLibrary

public static SchemaLibrary createSchemaLibrary(String name)
Create an in-memory schema library.

Parameters:
name - the name of the library; may be null if a default name is to be used
Returns:
the empty, in-memory schema library

externalizers

public static org.infinispan.marshall.AdvancedExternalizer<Object>[] externalizers()
Get the set of Externalizer implementations that are used by Schematic. These need to be registered with the GlobalConfiguration:
 GlobalConfiguration config = new GlobalConfiguration();
 config = config.fluent().serialization().addAdvancedExternalizer(Schematic.externalizers()).build();
 

Returns:
the list of externalizer

externalizerSet

public static Set<? extends org.infinispan.marshall.AdvancedExternalizer<?>> externalizerSet()
Get the complete set of AdvancedExternalizer implementations. Note that this does not include Externalizer implementations that are not AdvancedExternalizers.

Returns:
immutable set of AdvancedExternalizer implementations.

ModeShape Distribution 3.6.0.Final

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