org.apache.jackrabbit.core.persistence.bundle
Class PostgreSQLPersistenceManager

java.lang.Object
  extended by org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager
      extended by org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager
          extended by org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager
All Implemented Interfaces:
CachingPersistenceManager, IterablePersistenceManager, PersistenceManager

public class PostgreSQLPersistenceManager
extends BundleDbPersistenceManager

Extends the BundleDbPersistenceManager by PostgreSQL specific code.

Configuration:


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager
BundleDbPersistenceManager.CloseableBLOBStore, BundleDbPersistenceManager.DbBlobStore, BundleDbPersistenceManager.FSBlobStore
 
Field Summary
 
Fields inherited from class org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager
binding, blobStore, blockOnConnectionLoss, bundleDeleteSQL, bundleInsertSQL, bundleSelectAllIdsFromSQL, bundleSelectAllIdsSQL, bundleSelectSQL, bundleUpdateSQL, connectionManager, consistencyCheck, consistencyFix, driver, errorHandling, externalBLOBs, INITIAL_BUFFER_SIZE, initialized, nodeReferenceDeleteSQL, nodeReferenceInsertSQL, nodeReferenceSelectSQL, nodeReferenceUpdateSQL, password, schema, SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix, SM_BINARY_KEYS, SM_LONGLONG_KEYS, url, user
 
Fields inherited from class org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager
context, NODEFILENAME, NODEREFSFILENAME, RES_NAME_INDEX, RES_NS_INDEX
 
Constructor Summary
PostgreSQLPersistenceManager()
           
 
Method Summary
protected  DbNameIndex createDbNameIndex()
          Returns a new instance of a DbNameIndex.
 int getStorageModel()
          returns the storage model
 void init(PMContext context)
          Initializes the persistence manager. The persistence manager is permanently bound to the given context, and any required external resources are acquired.

An appropriate exception is thrown if the persistence manager initialization fails for whatever reason. In this case the state of the persistence manager is undefined and the instance should be discarded. Initializes the internal structures of this abstract persistence manager.

protected  NodePropBundle loadBundle(NodeId id)
          Loads a bundle from the underlying system.
 
Methods inherited from class org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager
buildSQLStatements, checkSchema, checkTablesExist, checkTablesWithUser, close, closeResultSet, closeStatement, closeStream, createBlobStore, createDBBlobStore, createLocalFSBlobStore, createParams, createSchemaSQL, destroy, destroyBundle, exists, existsBundle, getAllNodeIds, getBinding, getBlockOnConnectionLoss, getConsistencyCheck, getConsistencyFix, getDriver, getErrorHandling, getKey, getMinBlobSize, getNameIndex, getPassword, getSchema, getSchemaObjectPrefix, getUrl, getUser, isExternalBLOBs, load, logException, prepareSchemaObjectPrefix, resetStatement, setBlockOnConnectionLoss, setConsistencyCheck, setConsistencyFix, setDriver, setErrorHandling, setExternalBLOBs, setKey, setMinBlobSize, setPassword, setSchema, setSchemaObjectPrefix, setUrl, setUser, store, store, storeBundle, toString, useDbBlobStore, useLocalFsBlobStore
 
Methods inherited from class org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager
buildBlobFilePath, buildNodeFilePath, buildNodeFolderPath, buildNodeReferencesFilePath, buildPropFilePath, createNew, createNew, exists, exists, getBundleCacheSize, getNsIndex, load, load, onExternalUpdate, setBundleCacheSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PostgreSQLPersistenceManager

public PostgreSQLPersistenceManager()
Method Detail

init

public void init(PMContext context)
          throws Exception
Initializes the persistence manager. The persistence manager is permanently bound to the given context, and any required external resources are acquired.

An appropriate exception is thrown if the persistence manager initialization fails for whatever reason. In this case the state of the persistence manager is undefined and the instance should be discarded. Initializes the internal structures of this abstract persistence manager.

Specified by:
init in interface PersistenceManager
Overrides:
init in class BundleDbPersistenceManager
Parameters:
context - persistence manager context
Throws:
Exception - if the persistence manager initialization failed

createDbNameIndex

protected DbNameIndex createDbNameIndex()
                                 throws SQLException
Returns a new instance of a DbNameIndex.

Overrides:
createDbNameIndex in class BundleDbPersistenceManager
Returns:
a new instance of a DbNameIndex.
Throws:
SQLException - if an SQL error occurs.

getStorageModel

public int getStorageModel()
returns the storage model

Overrides:
getStorageModel in class BundleDbPersistenceManager
Returns:
the storage model

loadBundle

protected NodePropBundle loadBundle(NodeId id)
                             throws ItemStateException
Description copied from class: BundleDbPersistenceManager
Loads a bundle from the underlying system.

Overrides:
loadBundle in class BundleDbPersistenceManager
Parameters:
id - the node id of the bundle
Returns:
the loaded bundle or null if the bundle does not exist.
Throws:
ItemStateException - if an error while loading occurs.


Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.