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, DEFAULT_PAGE_SIZE, DOM_DBX_ID, ELEMENTS_DBX_ID, OFFSET_COLLECTION_ID, OFFSET_VALUE, PREPEND_DB_ALWAYS, PREPEND_DB_AS_NEEDED, PREPEND_DB_NEVER, PROPERTY_INDEX_DEPTH, PROPERTY_MIN_FREE_MEMORY, PROPERTY_PAGE_SIZE, TEMP_FRAGMENT_TIMEOUT, VALUES_DBX_ID, WORDS_DBX_ID |
| Fields inherited from class org.exist.storage.DBBroker |
customProperties, MATCH_EXACT, MATCH_REGEXP, MATCH_WILDCARDS, PROPERTY_XUPDATE_CONSISTENCY_CHECKS, PROPERTY_XUPDATE_FRAGMENTATION_FACTOR, PROPERTY_XUPDATE_GROWTH_FACTOR, ROOT_COLLECTION, ROOT_COLLECTION_NAME, SYSTEM_COLLECTION, TEMP_COLLECTION |
| Methods inherited from class org.exist.storage.NativeBroker |
addObserver, checkXMLResourceConsistency, checkXMLResourceTree, cleanUpTempCollection, cleanUpTempResources, closeDocument, copyCollection, copyXMLResource, defragXMLResource, deleteObservers, dropCollectionIndex, endElement, endRemove, flush, getAllXMLResources, getBinaryResource, getCollection, getCollectionResources, getDOMFile, getElementIndex, getFreeCollectionId, getFreeResourceId, getIndexConfiguration, getNextCollectionId, getNextResourceId, getNodeIterator, getNodeValue, getPageSize, getResourceMetadata, getSerializer, getStorage, getStorageFileIds, getSymbols, 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, 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, removeContentLoadingObserver, removeXMLResource, setId, setUser, 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 name)
throws PermissionDeniedException,
IOException
- get collection object If the collection does not yet exists, it is
created automatically.
Wraps for cluster the resultant collection in a ClusterCollection
- Overrides:
getOrCreateCollection in class NativeBroker
- Parameters:
name - the collection's nametransaction - The transaction, which registers the acquired write locks. The locks should be released on commit/abort.
- Returns:
- The orCreateCollection value
- Throws:
PermissionDeniedException - Description of the Exception
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.