org.exist.storage
Class NativeClusterBroker
java.lang.Object
java.util.Observable
org.exist.storage.DBBroker
org.exist.storage.NativeBroker
org.exist.storage.NativeClusterBroker
public class NativeClusterBroker
- extends NativeBroker
Created by Francesco Mondora.
- Author:
- Francesco Mondora aka Makkina, Michele Danieli aka mdanieli
Date: 13-dic-2004
Time: 17.12.51
Revision $Revision: 5432 $
Fields inherited from class org.exist.storage.NativeBroker |
BUFFERS, COLLECTIONS_DBX_ID, DEFAULT_DATA_DIR, DEFAULT_INDEX_DEPTH, DEFAULT_MIN_MEMORY, DEFAULT_NODES_BEFORE_MEMORY_CHECK, DOM_DBX_ID, ELEMENTS_DBX_ID, INDEX_DEPTH_ATTRIBUTE, OFFSET_COLLECTION_ID, OFFSET_VALUE, PAGE_SIZE_ATTRIBUTE, PREPEND_DB_ALWAYS, PREPEND_DB_AS_NEEDED, PREPEND_DB_NEVER, PROPERTY_INDEX_DEPTH, TEMP_FRAGMENT_TIMEOUT, VALUES_DBX_ID |
Fields inherited from class org.exist.storage.DBBroker |
CONFIGURATION_ELEMENT_NAME, MATCH_EXACT, MATCH_REGEXP, MATCH_WILDCARDS, PROPERTY_XUPDATE_CONSISTENCY_CHECKS, PROPERTY_XUPDATE_FRAGMENTATION_FACTOR, ROOT_COLLECTION, ROOT_COLLECTION_NAME, SYSTEM_COLLECTION, SYSTEM_COLLECTION_NAME, TEMP_COLLECTION, TEMP_COLLECTION_NAME, XUPDATE_CONSISTENCY_CHECKS_ATTRIBUTE, XUPDATE_FRAGMENTATION_FACTOR_ATTRIBUTE |
Methods inherited from class org.exist.storage.NativeBroker |
addObserver, backupToArchive, checkAvailableMemory, checkXMLResourceConsistency, checkXMLResourceTree, cleanUpTempResources, cleanUpTempResources, closeDocument, copyCollection, copyXMLResource, defragXMLResource, deleteObservers, dropCollectionIndex, endElement, endRemove, flush, getAllXMLResources, getBinaryResource, getCollection, getCollectionResources, getCollectionsFailsafe, getDefaultIndexDepth, getDOMFile, getElementIndex, getFreeCollectionId, getFreeResourceId, getIndexConfiguration, getNextCollectionId, getNextResourceId, getNextResourceId, getNodeIterator, getNodeValue, getResourceMetadata, getResourcesFailsafe, getSerializer, getStorage, getStorageFileIds, getTextEngine, getValueIndex, getXMLResource, getXMLResource, getXMLResourcesByDoctype, getXMLStreamReader, getXMLStreamReader, indexNode, indexNode, insertNodeAfter, isReadOnly, moveCollection, moveXMLResource, newSerializer, objectWith, objectWith, prepend, readBinaryResource, reindexCollection, reindexCollection, reindexCollection, removeAllNodes, removeBinaryResource, removeCollection, removeNode, removeXMLResource, repair, shutdown, storeBinaryResource, storeBinaryResource, storeNode, storeTempResource, storeXMLResource, updateNode |
Methods inherited from class org.exist.storage.DBBroker |
addContentLoadingObserver, clearContentLoadingObservers, decReferenceCount, endElement, getBrokerPool, getConfiguration, getId, getIndexController, getReferenceCount, getUser, getXQueryService, incReferenceCount, indexNode, initIndexModules, removeContentLoadingObserver, removeXMLResource, setId, setUser, storeNode, toString |
NativeClusterBroker
public NativeClusterBroker(BrokerPool pool,
Configuration config)
throws EXistException
- Throws:
EXistException
openCollection
public Collection openCollection(XmldbURI name,
int lockMode)
- Get collection object. If the collection does not exist, null is
returned.
Wraps for cluster the resultant collection in a ClusterCollection
- Overrides:
openCollection
in class NativeBroker
- Parameters:
name
- Description of the ParameterlockMode
- one of the modes specified in class
Lock
- Returns:
- The collection value
saveCollection
public void saveCollection(Txn transaction,
Collection collection)
throws PermissionDeniedException,
IOException
- Description copied from class:
NativeBroker
- Saves the specified collection to storage. Collections are usually cached in
memory. If a collection is modified, this method needs to be called to make
the changes persistent.
Note: appending a new document to a collection does not require a save.
- Overrides:
saveCollection
in class NativeBroker
collection
- Collection to store
- Throws:
PermissionDeniedException
IOException
getOrCreateCollection
public Collection getOrCreateCollection(Txn transaction,
XmldbURI uri)
throws PermissionDeniedException,
IOException
- Returns the database collection identified by the specified path. If the
collection does not yet exist, it is created - including all ancestors.
The path should be absolute, e.g. /db/shakespeare.
Wraps for cluster the resultant collection in a ClusterCollection
- Overrides:
getOrCreateCollection
in class NativeBroker
- Parameters:
transaction
- The transaction, which registers the acquired write locks. The locks should be released on commit/abort.uri
- The collection's URI
- Returns:
- The collection or
null
if no collection matches the path
- Throws:
PermissionDeniedException
IOException
sync
public void sync(int syncEvent)
- Description copied from class:
DBBroker
- Sync dom and collection state data (pages) to disk. In case of
Sync.MAJOR_SYNC
, sync all states (dom,
collection, text and element) to disk.
- Overrides:
sync
in class NativeBroker
- Parameters:
syncEvent
- Sync.MAJOR_SYNC or Sync.MINOR_SYNC
Copyright (C) Wolfgang Meier. All rights reserved.