org.neodatis.odb
Class OdbConfiguration

java.lang.Object
  extended by org.neodatis.odb.OdbConfiguration
Direct Known Subclasses:
Configuration

public class OdbConfiguration
extends java.lang.Object

The main NeoDatis ODB Configuration class. All engine configuration is done via this class.

Author:
osmadja

Constructor Summary
OdbConfiguration()
           
 
Method Summary
static void addLogId(java.lang.String logId)
           
static boolean automaticallyIncreaseCacheSize()
           
static boolean automaticCloseFileOnExit()
           
static boolean checkModelCompatibility()
           
static boolean checkRuntimeVersion()
           
static boolean displayWarnings()
           
static boolean enableEmptyConstructorCreation()
           
static java.lang.ClassLoader getClassLoader()
           
static ICoreProvider getCoreProvider()
           
static java.lang.String getDatabaseCharacterEncoding()
           
static DatabaseStartupManager getDatabaseStartupManager()
           
static int getDebugLevel()
           
static int getDefaultBufferSizeForData()
           
static int getDefaultBufferSizeForTransaction()
           
static long getDefaultFileCreationTime()
           
static int getDefaultIndexBTreeDegree()
           
static java.lang.String getEncryptionPassword()
           
static int getID_BLOCK_REPETITION_SIZE()
           
static int getIdBlockSize()
           
static java.lang.Class getIOClass()
           
static long getMaxNumberOfObjectInCache()
           
static int getMaxNumberOfWriteObjectPerTransaction()
           
static java.lang.Class getMessageStreamerClass()
           
static int getNB_IDS_PER_BLOCK()
           
static int getNbBuffers()
           
static int getNumberOfRetryToOpenFile()
           
static IQueryExecutorCallback getQueryExecutorCallback()
           
static long getRetryTimeout()
           
static int getRoundTypeForAverageDivision()
           
static int getScaleForAverageDivision()
           
static int getStringSpaceReserveFactor()
           
static long getTimeoutToAcquireMutexInMultiThread()
           
static boolean hasEncoding()
           
static boolean inPlaceUpdate()
           
static boolean isDebugEnabled()
           
static boolean isDebugEnabled(java.lang.String logId)
           
static boolean isEnableAfterWriteChecking()
           
static boolean isInfoEnabled()
           
static boolean isInfoEnabled(java.lang.String logId)
           
static boolean isLogAll()
           
static boolean isMonitoringMemory()
           
static boolean isMultiThread()
           
static boolean lockObjectsOnSelect()
           
static void lockObjectsOnSelect(boolean yesNo)
           
static boolean logServerConnections()
           
static boolean logServerStartupAndShutdown()
           
static void monitorMemory(boolean yes)
           
static boolean multiThreadExclusive()
           
static boolean reconnectObjectsToSession()
           
static void registerDatabaseStartupManager(DatabaseStartupManager manager)
           
static void removeDatabaseStartupManager()
           
static void removeLogId(java.lang.String logId)
           
static boolean retryIfFileIsLocked()
           
static boolean saveHistory()
           
static void setAutomaticallyIncreaseCacheSize(boolean automaticallyIncreaseCache)
           
static void setAutomaticCloseFileOnExit(boolean automaticFileClose)
           
static void setAutoReconnectObjectsToSession(boolean autoReconnectObjectsToSession)
          Deprecated. Use OdbConfiguration.setReconnectObjectsToSession instead
static void setCheckModelCompatibility(boolean checkModelCompatibility)
           
static void setCheckRuntimeVersion(boolean checkJavaRuntimeVersion)
           
static void setClassLoader(java.lang.ClassLoader classLoader)
           
static void setCoreProvider(ICoreProvider coreProvider)
           
static void setDatabaseCharacterEncoding(java.lang.String dbCharacterEncoding)
           
static void setDebugEnabled(boolean debugEnabled)
           
static void setDebugEnabled(int level, boolean debug)
           
static void setDebugLevel(int debugLevel)
           
static void setDefaultBufferSizeForData(int defaultBufferSize)
           
static void setDefaultBufferSizeForTransaction(int defaultBufferSizeForTransaction)
           
static void setDefaultFileCreationTime(long defaultFileCreationTime)
           
static void setDefaultIndexBTreeDegree(int defaultIndexBTreeSize)
           
static void setDisplayWarnings(boolean yesOrNo)
           
static void setEnableAfterWriteChecking(boolean enableAfterWriteChecking)
           
static void setEnableEmptyConstructorCreation(boolean enableEmptyConstructorCreation)
           
static void setIdBlockSize(int idBlockSize)
           
static void setInfoEnabled(boolean infoEnabled)
           
static void setIOClass(java.lang.Class IOClass, java.lang.String password)
           
static void setLatinDatabaseCharacterEncoding()
           
static void setLogAll(boolean logAll)
           
static void setLogServerConnections(boolean logServerConnections)
           
static void setLogServerStartupAndShutdown(boolean logServerStartup)
           
static void setMaxNumberOfObjectInCache(long maxNumberOfObjectInCache)
           
static void setMaxNumberOfWriteObjectPerTransaction(int maxNumberOfWriteObjectPerTransaction)
           
static void setMessageStreamerClass(java.lang.Class messageStreamerClass)
           
static void setMultiThreadExclusive(boolean trueOrFalse)
           
static void setNbBuffers(int nbBuffers)
           
static void setNumberOfRetryToOpenFile(int numberOfRetryToOpenFile)
           
static void setQueryExecutorCallback(IQueryExecutorCallback queryExecutorCallback)
           
static void setReconnectObjectsToSession(boolean reconnectObjectsToSession)
           
static void setRetryIfFileIsLocked(boolean retryIfFileIsLocked)
           
static void setRetryTimeout(long retryTimeout)
           
static void setRoundTypeForAverageDivision(int roundTypeForAverageDivision)
           
static void setSaveHistory(boolean saveTheHistory)
           
static void setScaleForAverageDivision(int scaleForAverageDivision)
           
static void setShareSameVmConnectionMultiThread(boolean shareSameVmConnectionMultiThread)
           
static void setStringSpaceReserveFactor(int stringSpaceReserveFactor)
           
static void setThrowExceptionWhenInconsistencyFound(boolean throwExceptionWhenInconsistencyFound)
           
static void setTimeoutToAcquireMutexInMultiThread(long timeoutToAcquireMutexInMultiThread)
           
static void setUseCache(boolean useCache)
           
static void setUseIndex(boolean useIndex)
           
static void setUseLazyCache(boolean useLazyCache)
           
static void setUseMultiBuffer(boolean useMultiBuffer)
           
static boolean shareSameVmConnectionMultiThread()
           
static boolean throwExceptionWhenInconsistencyFound()
           
static boolean useCache()
           
static boolean useIndex()
           
static boolean useLazyCache()
           
static boolean useMultiBuffer()
           
static void useMultiThread(boolean yes)
           
static void useMultiThread(boolean yes, int numberOfThreads)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OdbConfiguration

public OdbConfiguration()
Method Detail

reconnectObjectsToSession

public static boolean reconnectObjectsToSession()
Returns:

setAutoReconnectObjectsToSession

public static void setAutoReconnectObjectsToSession(boolean autoReconnectObjectsToSession)
Deprecated. Use OdbConfiguration.setReconnectObjectsToSession instead

Parameters:
autoReconnectObjectsToSession -

setReconnectObjectsToSession

public static void setReconnectObjectsToSession(boolean reconnectObjectsToSession)

getDefaultBufferSizeForData

public static int getDefaultBufferSizeForData()

setDefaultBufferSizeForData

public static void setDefaultBufferSizeForData(int defaultBufferSize)

addLogId

public static void addLogId(java.lang.String logId)

removeLogId

public static void removeLogId(java.lang.String logId)

isDebugEnabled

public static boolean isDebugEnabled(java.lang.String logId)

setDebugEnabled

public static void setDebugEnabled(int level,
                                   boolean debug)

isEnableAfterWriteChecking

public static boolean isEnableAfterWriteChecking()

isInfoEnabled

public static boolean isInfoEnabled()

isInfoEnabled

public static boolean isInfoEnabled(java.lang.String logId)

setInfoEnabled

public static void setInfoEnabled(boolean infoEnabled)

setEnableAfterWriteChecking

public static void setEnableAfterWriteChecking(boolean enableAfterWriteChecking)

getMaxNumberOfWriteObjectPerTransaction

public static int getMaxNumberOfWriteObjectPerTransaction()

setMaxNumberOfWriteObjectPerTransaction

public static void setMaxNumberOfWriteObjectPerTransaction(int maxNumberOfWriteObjectPerTransaction)

getMaxNumberOfObjectInCache

public static long getMaxNumberOfObjectInCache()

setMaxNumberOfObjectInCache

public static void setMaxNumberOfObjectInCache(long maxNumberOfObjectInCache)

getNumberOfRetryToOpenFile

public static int getNumberOfRetryToOpenFile()

setNumberOfRetryToOpenFile

public static void setNumberOfRetryToOpenFile(int numberOfRetryToOpenFile)

getRetryTimeout

public static long getRetryTimeout()

setRetryTimeout

public static void setRetryTimeout(long retryTimeout)

retryIfFileIsLocked

public static boolean retryIfFileIsLocked()

setRetryIfFileIsLocked

public static void setRetryIfFileIsLocked(boolean retryIfFileIsLocked)

getDefaultFileCreationTime

public static long getDefaultFileCreationTime()

setDefaultFileCreationTime

public static void setDefaultFileCreationTime(long defaultFileCreationTime)

isMultiThread

public static boolean isMultiThread()

useMultiThread

public static void useMultiThread(boolean yes)

useMultiThread

public static void useMultiThread(boolean yes,
                                  int numberOfThreads)

throwExceptionWhenInconsistencyFound

public static boolean throwExceptionWhenInconsistencyFound()

setThrowExceptionWhenInconsistencyFound

public static void setThrowExceptionWhenInconsistencyFound(boolean throwExceptionWhenInconsistencyFound)

automaticallyIncreaseCacheSize

public static boolean automaticallyIncreaseCacheSize()

setAutomaticallyIncreaseCacheSize

public static void setAutomaticallyIncreaseCacheSize(boolean automaticallyIncreaseCache)

getIdBlockSize

public static int getIdBlockSize()

setIdBlockSize

public static void setIdBlockSize(int idBlockSize)

getNB_IDS_PER_BLOCK

public static int getNB_IDS_PER_BLOCK()

getID_BLOCK_REPETITION_SIZE

public static int getID_BLOCK_REPETITION_SIZE()

inPlaceUpdate

public static boolean inPlaceUpdate()

getStringSpaceReserveFactor

public static int getStringSpaceReserveFactor()
Returns:
Returns the stringSpaceReserveFactor.

setStringSpaceReserveFactor

public static void setStringSpaceReserveFactor(int stringSpaceReserveFactor)
Parameters:
stringSpaceReserveFactor - The stringSpaceReserveFactor to set.

getDebugLevel

public static int getDebugLevel()
Returns:
Returns the debugLevel.

setDebugLevel

public static void setDebugLevel(int debugLevel)
Parameters:
debugLevel - The debugLevel to set.

getDefaultBufferSizeForTransaction

public static int getDefaultBufferSizeForTransaction()

setDefaultBufferSizeForTransaction

public static void setDefaultBufferSizeForTransaction(int defaultBufferSizeForTransaction)

getNbBuffers

public static int getNbBuffers()

setNbBuffers

public static void setNbBuffers(int nbBuffers)

useMultiBuffer

public static boolean useMultiBuffer()

setUseMultiBuffer

public static void setUseMultiBuffer(boolean useMultiBuffer)

checkModelCompatibility

public static boolean checkModelCompatibility()

setCheckModelCompatibility

public static void setCheckModelCompatibility(boolean checkModelCompatibility)

automaticCloseFileOnExit

public static boolean automaticCloseFileOnExit()

setAutomaticCloseFileOnExit

public static void setAutomaticCloseFileOnExit(boolean automaticFileClose)

isLogAll

public static boolean isLogAll()

setLogAll

public static void setLogAll(boolean logAll)

logServerConnections

public static boolean logServerConnections()

setLogServerConnections

public static void setLogServerConnections(boolean logServerConnections)

getDefaultIndexBTreeDegree

public static int getDefaultIndexBTreeDegree()

setDefaultIndexBTreeDegree

public static void setDefaultIndexBTreeDegree(int defaultIndexBTreeSize)

useLazyCache

public static boolean useLazyCache()

setUseLazyCache

public static void setUseLazyCache(boolean useLazyCache)

getQueryExecutorCallback

public static IQueryExecutorCallback getQueryExecutorCallback()
Returns:
the queryExecutorCallback

setQueryExecutorCallback

public static void setQueryExecutorCallback(IQueryExecutorCallback queryExecutorCallback)
Parameters:
queryExecutorCallback - the queryExecutorCallback to set

useCache

public static boolean useCache()
Returns:
the useCache

setUseCache

public static void setUseCache(boolean useCache)
Parameters:
useCache - the useCache to set

isMonitoringMemory

public static boolean isMonitoringMemory()

monitorMemory

public static void monitorMemory(boolean yes)

displayWarnings

public static boolean displayWarnings()

setDisplayWarnings

public static void setDisplayWarnings(boolean yesOrNo)

saveHistory

public static boolean saveHistory()

setSaveHistory

public static void setSaveHistory(boolean saveTheHistory)

getScaleForAverageDivision

public static int getScaleForAverageDivision()

setScaleForAverageDivision

public static void setScaleForAverageDivision(int scaleForAverageDivision)

getRoundTypeForAverageDivision

public static int getRoundTypeForAverageDivision()

setRoundTypeForAverageDivision

public static void setRoundTypeForAverageDivision(int roundTypeForAverageDivision)

enableEmptyConstructorCreation

public static boolean enableEmptyConstructorCreation()

setEnableEmptyConstructorCreation

public static void setEnableEmptyConstructorCreation(boolean enableEmptyConstructorCreation)

getIOClass

public static java.lang.Class getIOClass()

setIOClass

public static void setIOClass(java.lang.Class IOClass,
                              java.lang.String password)

getEncryptionPassword

public static java.lang.String getEncryptionPassword()

getCoreProvider

public static ICoreProvider getCoreProvider()

setCoreProvider

public static void setCoreProvider(ICoreProvider coreProvider)

getDatabaseCharacterEncoding

public static java.lang.String getDatabaseCharacterEncoding()

setDatabaseCharacterEncoding

public static void setDatabaseCharacterEncoding(java.lang.String dbCharacterEncoding)
                                         throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

setLatinDatabaseCharacterEncoding

public static void setLatinDatabaseCharacterEncoding()
                                              throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

hasEncoding

public static boolean hasEncoding()

getClassLoader

public static java.lang.ClassLoader getClassLoader()

setClassLoader

public static void setClassLoader(java.lang.ClassLoader classLoader)

checkRuntimeVersion

public static boolean checkRuntimeVersion()

setCheckRuntimeVersion

public static void setCheckRuntimeVersion(boolean checkJavaRuntimeVersion)

getMessageStreamerClass

public static java.lang.Class getMessageStreamerClass()
Returns:

setMessageStreamerClass

public static void setMessageStreamerClass(java.lang.Class messageStreamerClass)

logServerStartupAndShutdown

public static boolean logServerStartupAndShutdown()

setLogServerStartupAndShutdown

public static void setLogServerStartupAndShutdown(boolean logServerStartup)

useIndex

public static boolean useIndex()

setUseIndex

public static void setUseIndex(boolean useIndex)

isDebugEnabled

public static boolean isDebugEnabled()

setDebugEnabled

public static void setDebugEnabled(boolean debugEnabled)

shareSameVmConnectionMultiThread

public static boolean shareSameVmConnectionMultiThread()

setShareSameVmConnectionMultiThread

public static void setShareSameVmConnectionMultiThread(boolean shareSameVmConnectionMultiThread)

lockObjectsOnSelect

public static void lockObjectsOnSelect(boolean yesNo)

lockObjectsOnSelect

public static boolean lockObjectsOnSelect()

getTimeoutToAcquireMutexInMultiThread

public static long getTimeoutToAcquireMutexInMultiThread()

setTimeoutToAcquireMutexInMultiThread

public static void setTimeoutToAcquireMutexInMultiThread(long timeoutToAcquireMutexInMultiThread)

multiThreadExclusive

public static boolean multiThreadExclusive()
Returns:

setMultiThreadExclusive

public static void setMultiThreadExclusive(boolean trueOrFalse)

registerDatabaseStartupManager

public static void registerDatabaseStartupManager(DatabaseStartupManager manager)

removeDatabaseStartupManager

public static void removeDatabaseStartupManager()

getDatabaseStartupManager

public static DatabaseStartupManager getDatabaseStartupManager()