Class InMemoryRepository

  extended by org.modeshape.graph.connector.base.Repository<InMemoryNode,InMemoryWorkspace>
      extended by org.modeshape.graph.connector.inmemory.InMemoryRepository

public class InMemoryRepository
extends Repository<InMemoryNode,InMemoryWorkspace>

The representation of an in-memory repository and its content.

Field Summary
protected  ReadWriteLock lock
Fields inherited from class org.modeshape.graph.connector.base.Repository
context, rootNodeUuid, source
Constructor Summary
InMemoryRepository(InMemoryRepositorySource source)
Method Summary
 InMemoryTransaction startTransaction(ExecutionContext context, boolean readonly)
          Begin a transaction, hinting whether the transaction will be used only to read the content.
Methods inherited from class org.modeshape.graph.connector.base.Repository
createRequestProcessor, createWorkspace, destroyWorkspace, getContext, getDefaultWorkspaceName, getRootNodeUuid, getSourceName, getWorkspace, getWorkspaceNames, initialize
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


protected final ReadWriteLock lock
Constructor Detail


public InMemoryRepository(InMemoryRepositorySource source)
Method Detail


public InMemoryTransaction startTransaction(ExecutionContext context,
                                            boolean readonly)
Begin a transaction, hinting whether the transaction will be used only to read the content. If this is called, then the transaction must be either committed or rolled back.

Specified by:
startTransaction in class Repository<InMemoryNode,InMemoryWorkspace>
context - the context in which the transaction is to be performed; may not be null
readonly - true if the transaction will not modify any content, or false if changes are to be made
the transaction; never null
See Also:
Repository.startTransaction(org.modeshape.graph.ExecutionContext, boolean)

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