Class H2PersistenceManager
- java.lang.Object
-
- org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager
-
- org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager
-
- org.apache.jackrabbit.core.persistence.pool.H2PersistenceManager
-
- All Implemented Interfaces:
CacheAccessListener
,CachingPersistenceManager
,ConsistencyChecker
,IterablePersistenceManager
,PersistenceManager
,DatabaseAware
public class H2PersistenceManager extends BundleDbPersistenceManager
Extends theBundleDbPersistenceManager
by H2 specific code.Configuration:
<PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.H2PersistenceManager"> <param name="
bundleCacheSize
" value="8"/> <param name="consistencyCheck
" value="false"/> <param name="minBlobSize
" value="16384"/> <param name="driver
" value="org.h2.Driver"/> <param name="url
" value="jdbc:h2:file:${wsp.home}/db/itemState"/> <param name="user
" value=""/> <param name="password
" value=""/> <param name="schema
" value="h2"/> <param name="schemaObjectPrefix
" value=""/> <param name="errorHandling
" value=""/> <param name="lockTimeout
" value="10000"/> </PersistenceManager>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager
BundleDbPersistenceManager.CloseableBLOBStore, BundleDbPersistenceManager.DbBlobStore, BundleDbPersistenceManager.FSBlobStore
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager
binding, blobStore, blockOnConnectionLoss, bundleDeleteSQL, bundleInsertSQL, bundleSelectAllBundlesFromSQL, bundleSelectAllBundlesSQL, bundleSelectAllIdsFromSQL, bundleSelectAllIdsSQL, bundleSelectSQL, bundleUpdateSQL, conHelper, consistencyCheck, consistencyFix, databaseType, dataSourceName, driver, errorHandling, externalBLOBs, INITIAL_BUFFER_SIZE, initialized, nodeReferenceDeleteSQL, nodeReferenceInsertSQL, nodeReferenceSelectSQL, nodeReferenceUpdateSQL, password, 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
-
Fields inherited from interface org.apache.jackrabbit.core.cache.CacheAccessListener
ACCESS_INTERVAL
-
-
Constructor Summary
Constructors Constructor Description H2PersistenceManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getLockTimeout()
Returns the lock timeout.void
init(PMContext context)
Initializes the persistence manager.void
setLockTimeout(String lockTimeout)
Sets the lock timeout in milliseconds.-
Methods inherited from class org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager
buildSQLStatements, close, createBlobStore, createCheckSchemaOperation, createConnectionHelper, createDBBlobStore, createDbNameIndex, createLocalFSBlobStore, createParams, destroy, destroyBundle, existsReferencesTo, getAllNodeIds, getAllNodeInfos, getBlobStore, getBlockOnConnectionLoss, getConsistencyCheck, getConsistencyFix, getDatabaseType, getDataSourceName, getDriver, getErrorHandling, getKey, getMinBlobSize, getNameIndex, getPassword, getSchema, getSchemaObjectPrefix, getStorageModel, getUrl, getUser, isExternalBLOBs, isSchemaCheckEnabled, loadBundle, loadReferencesTo, setBlockOnConnectionLoss, setConnectionFactory, setConsistencyCheck, setConsistencyFix, setDatabaseType, setDataSourceName, setDriver, setErrorHandling, setExternalBLOBs, setMinBlobSize, setPassword, setSchema, setSchemaCheckEnabled, 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, cacheAccessed, check, checkConsistency, createNew, createNew, disposeCache, evictBundle, exists, exists, getBundleCacheSize, getNsIndex, load, load, onExternalUpdate, setBundleCacheSize, setEventChannel
-
-
-
-
Method Detail
-
getLockTimeout
public String getLockTimeout()
Returns the lock timeout.- Returns:
- the lock timeout
-
setLockTimeout
public void setLockTimeout(String lockTimeout)
Sets the lock timeout in milliseconds.- Parameters:
lockTimeout
- the lock timeout.
-
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 interfacePersistenceManager
- Overrides:
init
in classBundleDbPersistenceManager
- Parameters:
context
- persistence manager context- Throws:
Exception
- if the persistence manager initialization failed
-
-