Class Database
java.lang.Object
org.h2.engine.Database
- All Implemented Interfaces:
CastDataProvider, DataHandler
There is one database object per open database.
The format of the meta data table is:
id int, 0, objectType int, sql varchar
- Since:
- 2004-04-15 22:49
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate intprivate static final booleanprivate Authenticatorprivate final booleanprivate final intprivate final AtomicReference<DbException> private final Stringprivate final Stringprivate intprivate booleanprivate Stringprivate final ConcurrentHashMap<String, Comment> private intprivate CompareModeprivate SourceCompilerprivate final Stringprivate final Stringprivate final Stringprivate final DbSettingsprivate DefaultNullOrderingprivate intprivate DelayedDatabaseCloserprivate booleanprivate static final SessionLocal[]private DatabaseEventListenerprivate final AtomicReference<SessionLocal> private final byte[]private final FileLockMethodprivate final byte[]private booleanprivate booleanprivate final Schemaprivate static intprivate JavaObjectSerializerprivate booleanprivate Stringprivate HashMap<TableLinkConnection, TableLinkConnection> private SmallLRUCache<String, String[]> private SessionLocalprivate final LobStorageInterfaceprivate final Objectprivate FileLockprivate intprivate final Schemaprivate intprivate intprivate intprivate final Tableprivate static final ThreadLocal<SessionLocal> private static final ThreadLocal<Database> private static final ThreadLocal<Throwable> private final Indexprivate Modeprivate final AtomicLongprivate final AtomicLongprivate intprivate intprivate final BitSetprivate booleanprivate final intprivate final booleanprivate final Schemaprivate intprivate final Roleprivate booleanprivate QueryStatisticsDataprivate intprivate booleanprivate booleanprivate final AtomicLongUsed to trigger the client side to reload some of the settings.private final ConcurrentHashMap<String, Right> private RowFactoryprivate final ConcurrentHashMap<String, Schema> private Serverprivate final ConcurrentHashMap<String, Setting> private booleanprivate final Storeprivate static final StringThe default name of the system user.private SessionLocalprivate final Userprivate final HashMap<String, TableEngine> private final TempFileDeleterprivate final Traceprivate final TraceSystemprivate final ConcurrentHashMap<String, RightOwner> private final Set<SessionLocal> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDatabaseObject(SessionLocal session, DbObject obj) Add an object to the database.private voidaddMeta(SessionLocal session, DbObject obj) voidaddSchemaObject(SessionLocal session, SchemaObject obj) Add a schema object to the database.intAllocate a new object id.private voidcheckMetaFree(SessionLocal session, int id) voidFlush all changes and open a new transaction log.voidCheck if the simulated power failure occurred.private voidvoidCheck if writing is allowed.(package private) voidclose(boolean fromShutdownHook) Close the database.private voidcloseAllSessionsExcept(SessionLocal except) private voidprivate voidcloseImpl(boolean fromShutdownHook) private voidClose all open files and unlock the database.private SessionLocalcreateSession(User user) (package private) SessionLocalcreateSession(User user, NetworkConnectionInfo networkConnectionInfo) Create a session for the given user.private CreateTableDataReturns the current timestamp with maximum resolution.Returns the current time zone.private voidbooleanequalsIdentifiers(String a, String b) Compare two identifiers (table names, column names,...) and verify they are equal.voidexceptionThrown(SQLException e, String sql) This method is called after an exception occurred, to inform the database event listener (if one is set).private voidprivate voidexecuteMeta(ArrayList<MetaRecord> records) findComment(DbObject object) Get the comment for the given database object if one exists, or null if not.Get the role if it exists, or null if not.findSchema(String schemaName) Get the schema if it exists, or null if not.findSetting(String name) Get the setting if it exists, or null if not.Get the user if it exists, or null if not.findUserOrRole(String name) Get the user or role if it exists, ornullif not.voidflush()Flush all pending changes to the transaction log.intGet all synonyms.Get all tables and views.get authenticator for database usersReturn compare mode.Get the database path.intgetDependentTable(SchemaObject obj, Table except) Get the first table that depends on this object.byte[]Get the first user defined table, excluding the LOB_BLOCKS table that the Recover tool creates.booleanbooleanGet the list of in-doubt transactions.Returns the custom Java object serializer, ornull.getLinkConnection(String driver, String url, String user, String password) Open a new connection or get an existing connection to another database.Get the lob file list cache if it is used.Get the lob storage mechanism to use.Get the synchronization object for lob operations.intintReturns main schema (usually PUBLIC).getMap(int type) intGet the maximum length of a in-place large objectintintgetMode()Returns the database mode.longlonggetName()longlonglongbooleanintintbooleanbooleanlongintGet the schema.intgetSessions(boolean includingSystemSession) Get all sessions that are currently connected to the database.getStore()Returns system user.getTableEngine(String tableEngine) Get the table engine class, loading it if needed.Get the temp file deleter mechanism.getTempTableName(String baseName, SessionLocal session) Get a unique temporary table name.getTrace(int moduleId) Get the trace object for the given module id.Get user with the given name.private voidbooleanbooleanCheck if the database is in the process of closing.booleanCheck if this database is disk-based.booleanbooleanCheck if the database is currently opening.booleanChecks if the system table (containing the catalog) is locked.booleanisSysTableLockedBy(SessionLocal session) Checks if the system table (containing the catalog) is locked by the given session.private static booleanisUpperSysIdentifier(String upperName) (package private) booleanisUserSession(SessionLocal session) booleanlockMeta(SessionLocal session) Lock the metadata table for updates.private voidlockMetaAssertion(SessionLocal session) <V> ConcurrentHashMap<String, V> Create a new hash map.Create a new hash map.newStringMap(int initialCapacity) Create a new hash map.(package private) voidopened()Called after the database has been opened and initialized.Open a file at the given location.private String(package private) voidprepareCommit(SessionLocal session, String transaction) Prepare a transaction.intreadLob(long lobId, byte[] hmac, long offset, byte[] buff, int off, int length) Read from a lob.private voidvoidreleaseDatabaseObjectIds(BitSet idsToRelease) Mark some database ids as unused.voidremoveDatabaseObject(SessionLocal session, DbObject obj) Remove the object from the database.voidremoveMeta(SessionLocal session, int id) Remove the given object from the meta data.private voidvoidremoveSchemaObject(SessionLocal session, SchemaObject obj) Remove an object from the system table.voidremoveSession(SessionLocal session) Remove a session.voidrenameDatabaseObject(SessionLocal session, DbObject obj, String newName) Rename a database object.voidrenameSchemaObject(SessionLocal session, SchemaObject obj, String newName) Rename a schema object.voidsetAllowBuiltinAliasOverride(boolean b) voidsetAllowLiterals(int value) voidsetAuthenticator(Authenticator authenticator) Set current database authenticatorvoidvoidsetCacheSize(int kb) voidsetCloseDelay(int value) voidsetCluster(String cluster) voidsetCompactMode(int compactMode) voidsetCompareMode(CompareMode compareMode) voidsetDefaultNullOrdering(DefaultNullOrdering defaultNullOrdering) voidsetDefaultTableType(int defaultTableType) voidsetDeleteFilesOnDisconnect(boolean b) voidsetEventListener(DatabaseEventListener eventListener) voidsetEventListenerClass(String className) booleansetExclusiveSession(SessionLocal session, boolean closeOthers) Set the session that can exclusively access the database.voidsetIgnoreCase(boolean b) voidsetIgnoreCatalogs(boolean b) static voidsetInitialPowerOffCount(int count) voidsetJavaObjectSerializerName(String serializerName) voidsetLockMode(int lockMode) voidsetMasterUser(User user) voidsetMaxLengthInplaceLob(int value) voidsetMaxMemoryRows(int value) voidsetMaxOperationMemory(int maxOperationMemory) voidvoidsetOptimizeReuseResults(boolean b) voidsetPowerOffCount(int count) voidsetProgress(int state, String name, long x, long max) Set the progress of a long running operation.voidsetQueryStatistics(boolean b) voidsetQueryStatisticsMaxEntries(int n) voidsetReadOnly(boolean readOnly) Switch the database to read-only mode.voidsetReferentialIntegrity(boolean b) voidsetRetentionTime(int value) voidsetRowFactory(RowFactory rowFactory) voidsetWriteDelay(int value) voidImmediately close the database.private voidstartServer(String key) private voidvoidsync()Synchronize the files with the file system.sysIdentifier(String upperName) Returns identifier in upper or lower case depending on database settings.(package private) voidIf there is a background store thread, and if there wasn an exception in that thread, throw it now.toString()voidunlockMeta(SessionLocal session) Unlock the metadata table.(package private) static voidunlockMetaDebug(SessionLocal session) This method doesn't actually unlock the metadata table, all it does it reset the debugging flags.booleanunsetExclusiveSession(SessionLocal session) Stop exclusive access the database by provided session.voidupdateMeta(SessionLocal session, DbObject obj) Update an object in the system table.private voidupdateMetaAndFirstLevelChildren(SessionLocal session, DbObject obj) (package private) booleanvalidateFilePasswordHash(String testCipher, byte[] testHash) Check if the file password hash is correct.voidverifyMetaLocked(SessionLocal session) Verify the meta table is locked.booleanReturns are ENUM values 0-based.
-
Field Details
-
initialPowerOffCount
private static int initialPowerOffCount -
ASSERT
private static final boolean ASSERT -
META_LOCK_DEBUGGING
-
META_LOCK_DEBUGGING_DB
-
META_LOCK_DEBUGGING_STACK
-
EMPTY_SESSION_ARRAY
-
SYSTEM_USER_NAME
The default name of the system user. This name is only used as long as there is no administrator user registered.- See Also:
-
persistent
private final boolean persistent -
databaseName
-
databaseShortName
-
databaseURL
-
cipher
-
filePasswordHash
private final byte[] filePasswordHash -
fileEncryptionKey
private final byte[] fileEncryptionKey -
usersAndRoles
-
settings
-
schemas
-
rights
-
comments
-
tableEngines
-
userSessions
-
exclusiveSession
-
objectIds
-
lobSyncObject
-
mainSchema
-
infoSchema
-
pgCatalogSchema
-
nextSessionId
private int nextSessionId -
nextTempTableId
private int nextTempTableId -
systemUser
-
systemSession
-
lobSession
-
meta
-
metaIdIndex
-
lock
-
starting
private volatile boolean starting -
traceSystem
-
trace
-
fileLockMethod
-
publicRole
-
modificationDataId
-
modificationMetaId
-
remoteSettingsId
Used to trigger the client side to reload some of the settings. -
compareMode
-
cluster
-
readOnly
private boolean readOnly -
eventListener
-
maxMemoryRows
private int maxMemoryRows -
lockMode
private int lockMode -
maxLengthInplaceLob
private int maxLengthInplaceLob -
allowLiterals
private int allowLiterals -
powerOffCount
private int powerOffCount -
closeDelay
private volatile int closeDelay -
delayedCloser
-
closing
private volatile boolean closing -
ignoreCase
private boolean ignoreCase -
deleteFilesOnDisconnect
private boolean deleteFilesOnDisconnect -
optimizeReuseResults
private boolean optimizeReuseResults -
cacheType
-
referentialIntegrity
private boolean referentialIntegrity -
mode
-
defaultNullOrdering
-
maxOperationMemory
private int maxOperationMemory -
lobFileListCache
-
autoServerMode
private final boolean autoServerMode -
autoServerPort
private final int autoServerPort -
server
-
linkConnections
-
tempFileDeleter
-
compactMode
private int compactMode -
compiler
-
lobStorage
-
pageSize
private final int pageSize -
defaultTableType
private int defaultTableType -
dbSettings
-
store
-
allowBuiltinAliasOverride
private boolean allowBuiltinAliasOverride -
backgroundException
-
javaObjectSerializer
-
javaObjectSerializerName
-
javaObjectSerializerInitialized
private volatile boolean javaObjectSerializerInitialized -
queryStatistics
private boolean queryStatistics -
queryStatisticsMaxEntries
private int queryStatisticsMaxEntries -
queryStatisticsData
-
rowFactory
-
ignoreCatalogs
private boolean ignoreCatalogs -
authenticator
-
-
Constructor Details
-
Database
-
-
Method Details
-
getLockTimeout
public int getLockTimeout() -
getRowFactory
-
setRowFactory
-
setInitialPowerOffCount
public static void setInitialPowerOffCount(int count) -
setPowerOffCount
public void setPowerOffCount(int count) -
getStore
-
getModificationDataId
public long getModificationDataId() -
getNextModificationDataId
public long getNextModificationDataId() -
getModificationMetaId
public long getModificationMetaId() -
getNextModificationMetaId
public long getNextModificationMetaId() -
getRemoteSettingsId
public long getRemoteSettingsId() -
getNextRemoteSettingsId
public long getNextRemoteSettingsId() -
getPowerOffCount
public int getPowerOffCount() -
checkPowerOff
public void checkPowerOff()Description copied from interface:DataHandlerCheck if the simulated power failure occurred. This call will decrement the countdown.- Specified by:
checkPowerOffin interfaceDataHandler
-
checkPowerOff2
private void checkPowerOff2() -
getTrace
Get the trace object for the given module id.- Parameters:
moduleId- the module id- Returns:
- the trace object
-
openFile
Description copied from interface:DataHandlerOpen a file at the given location.- Specified by:
openFilein interfaceDataHandler- Parameters:
name- the file nameopenMode- the modemustExist- whether the file must already exist- Returns:
- the file
-
validateFilePasswordHash
Check if the file password hash is correct.- Parameters:
testCipher- the cipher algorithmtestHash- the hash code- Returns:
- true if the cipher algorithm and the password match
-
parseDatabaseShortName
-
createSysTableData
-
executeMeta
private void executeMeta() -
executeMeta
-
startServer
-
stopServer
private void stopServer() -
recompileInvalidViews
private void recompileInvalidViews() -
addMeta
-
verifyMetaLocked
Verify the meta table is locked.- Parameters:
session- the session
-
lockMeta
Lock the metadata table for updates.- Parameters:
session- the session- Returns:
- whether it was already locked before by this session
-
lockMetaAssertion
-
unlockMeta
Unlock the metadata table.- Parameters:
session- the session
-
unlockMetaDebug
This method doesn't actually unlock the metadata table, all it does it reset the debugging flags.- Parameters:
session- the session
-
removeMeta
Remove the given object from the meta data.- Parameters:
session- the sessionid- the id of the object to remove
-
releaseDatabaseObjectIds
Mark some database ids as unused.- Parameters:
idsToRelease- the ids to release
-
getMap
-
addSchemaObject
Add a schema object to the database.- Parameters:
session- the sessionobj- the object to add
-
addDatabaseObject
Add an object to the database.- Parameters:
session- the sessionobj- the object to add
-
findComment
-
findRole
-
findSchema
-
findSetting
-
findUser
-
getUser
Get user with the given name. This method throws an exception if the user does not exist.- Parameters:
name- the user name- Returns:
- the user
- Throws:
DbException- if the user does not exist
-
findUserOrRole
Get the user or role if it exists, ornullif not.- Parameters:
name- the name of the user or role- Returns:
- the user, the role, or
null
-
createSession
Create a session for the given user.- Parameters:
user- the usernetworkConnectionInfo- the network connection information, ornull- Returns:
- the session, or null if the database is currently closing
- Throws:
DbException- if the database is in exclusive mode
-
createSession
-
removeSession
Remove a session. This method is called after the user has disconnected.- Parameters:
session- the session
-
isUserSession
-
closeAllSessionsExcept
-
close
void close(boolean fromShutdownHook) Close the database.- Parameters:
fromShutdownHook- true if this method is called from the shutdown hook
-
closeImpl
private void closeImpl(boolean fromShutdownHook) -
removeOrphanedLobs
private void removeOrphanedLobs() -
closeOpenFilesAndUnlock
private void closeOpenFilesAndUnlock()Close all open files and unlock the database. -
closeFiles
private void closeFiles() -
checkMetaFree
-
allocateObjectId
public int allocateObjectId()Allocate a new object id.- Returns:
- the id
-
getSystemUser
-
getMainSchema
Returns main schema (usually PUBLIC).- Returns:
- main schema (usually PUBLIC)
-
getAllComments
-
getAllowLiterals
public int getAllowLiterals() -
getAllRights
-
getAllTablesAndViews
-
getAllSynonyms
-
getAllSchemas
-
getAllSchemasNoMeta
-
getAllSettings
-
getAllUsersAndRoles
-
getCacheType
-
getCluster
-
getCompareMode
Description copied from interface:DataHandlerReturn compare mode.- Specified by:
getCompareModein interfaceDataHandler- Returns:
- Compare mode.
-
getDatabasePath
Description copied from interface:DataHandlerGet the database path.- Specified by:
getDatabasePathin interfaceDataHandler- Returns:
- the database path
-
getShortName
-
getName
-
getSessions
Get all sessions that are currently connected to the database.- Parameters:
includingSystemSession- if the system session should also be included- Returns:
- the list of sessions
-
updateMeta
Update an object in the system table.- Parameters:
session- the sessionobj- the database object
-
renameSchemaObject
Rename a schema object.- Parameters:
session- the sessionobj- the objectnewName- the new name
-
updateMetaAndFirstLevelChildren
-
renameDatabaseObject
Rename a database object.- Parameters:
session- the sessionobj- the objectnewName- the new name
-
deleteOldTempFiles
private void deleteOldTempFiles() -
getSchema
Get the schema. If the schema does not exist, an exception is thrown.- Parameters:
schemaName- the name of the schema- Returns:
- the schema
- Throws:
DbException- no schema with that name exists
-
removeDatabaseObject
Remove the object from the database.- Parameters:
session- the sessionobj- the object to remove
-
getDependentTable
Get the first table that depends on this object.- Parameters:
obj- the object to findexcept- the table to exclude (or null)- Returns:
- the first dependent table, or null
-
removeSchemaObject
Remove an object from the system table.- Parameters:
session- the sessionobj- the object to be removed
-
isPersistent
public boolean isPersistent()Check if this database is disk-based.- Returns:
- true if it is disk-based, false if it is in-memory only.
-
getTraceSystem
-
setCacheSize
public void setCacheSize(int kb) -
setMasterUser
-
getPublicRole
-
getTempTableName
Get a unique temporary table name.- Parameters:
baseName- the prefix of the returned namesession- the session- Returns:
- a unique name
-
setCompareMode
-
setCluster
-
checkWritingAllowed
public void checkWritingAllowed()Description copied from interface:DataHandlerCheck if writing is allowed.- Specified by:
checkWritingAllowedin interfaceDataHandler
-
isReadOnly
public boolean isReadOnly() -
setWriteDelay
public void setWriteDelay(int value) -
getRetentionTime
public int getRetentionTime() -
setRetentionTime
public void setRetentionTime(int value) -
setAllowBuiltinAliasOverride
public void setAllowBuiltinAliasOverride(boolean b) -
isAllowBuiltinAliasOverride
public boolean isAllowBuiltinAliasOverride() -
getInDoubtTransactions
Get the list of in-doubt transactions.- Returns:
- the list
-
prepareCommit
Prepare a transaction.- Parameters:
session- the sessiontransaction- the name of the transaction
-
throwLastBackgroundException
void throwLastBackgroundException()If there is a background store thread, and if there wasn an exception in that thread, throw it now. -
setBackgroundException
-
getBackgroundException
-
flush
public void flush()Flush all pending changes to the transaction log. -
setEventListener
-
setEventListenerClass
-
setProgress
Set the progress of a long running operation. This method calls theDatabaseEventListenerif one is registered.- Parameters:
state- theDatabaseEventListenerstatename- the object namex- the current positionmax- the highest value or 0 if unknown
-
exceptionThrown
This method is called after an exception occurred, to inform the database event listener (if one is set).- Parameters:
e- the exceptionsql- the SQL statement
-
sync
public void sync()Synchronize the files with the file system. This method is called when executing the SQL statement CHECKPOINT SYNC. -
getMaxMemoryRows
public int getMaxMemoryRows() -
setMaxMemoryRows
public void setMaxMemoryRows(int value) -
setLockMode
public void setLockMode(int lockMode) -
getLockMode
public int getLockMode() -
setCloseDelay
public void setCloseDelay(int value) -
getSystemSession
-
isClosing
public boolean isClosing()Check if the database is in the process of closing.- Returns:
- true if the database is closing
-
setMaxLengthInplaceLob
public void setMaxLengthInplaceLob(int value) -
getMaxLengthInplaceLob
public int getMaxLengthInplaceLob()Description copied from interface:DataHandlerGet the maximum length of a in-place large object- Specified by:
getMaxLengthInplaceLobin interfaceDataHandler- Returns:
- the maximum size
-
setIgnoreCase
public void setIgnoreCase(boolean b) -
getIgnoreCase
public boolean getIgnoreCase() -
setIgnoreCatalogs
public void setIgnoreCatalogs(boolean b) -
getIgnoreCatalogs
public boolean getIgnoreCatalogs() -
setDeleteFilesOnDisconnect
public void setDeleteFilesOnDisconnect(boolean b) -
setAllowLiterals
public void setAllowLiterals(int value) -
getOptimizeReuseResults
public boolean getOptimizeReuseResults() -
setOptimizeReuseResults
public void setOptimizeReuseResults(boolean b) -
getLobSyncObject
Description copied from interface:DataHandlerGet the synchronization object for lob operations.- Specified by:
getLobSyncObjectin interfaceDataHandler- Returns:
- the synchronization object
-
getSessionCount
public int getSessionCount() -
setReferentialIntegrity
public void setReferentialIntegrity(boolean b) -
getReferentialIntegrity
public boolean getReferentialIntegrity() -
setQueryStatistics
public void setQueryStatistics(boolean b) -
getQueryStatistics
public boolean getQueryStatistics() -
setQueryStatisticsMaxEntries
public void setQueryStatisticsMaxEntries(int n) -
getQueryStatisticsData
-
isStarting
public boolean isStarting()Check if the database is currently opening. This is true until all stored SQL statements have been executed.- Returns:
- true if the database is still starting
-
opened
void opened()Called after the database has been opened and initialized. This method notifies the event listener if one has been set. -
setMode
-
getMode
Description copied from interface:CastDataProviderReturns the database mode.- Specified by:
getModein interfaceCastDataProvider- Returns:
- the database mode
-
setDefaultNullOrdering
-
getDefaultNullOrdering
-
setMaxOperationMemory
public void setMaxOperationMemory(int maxOperationMemory) -
getMaxOperationMemory
public int getMaxOperationMemory() -
getExclusiveSession
-
setExclusiveSession
Set the session that can exclusively access the database.- Parameters:
session- the sessioncloseOthers- whether other sessions are closed- Returns:
- true if success or if database is in exclusive mode set by this session already, false otherwise
-
unsetExclusiveSession
Stop exclusive access the database by provided session.- Parameters:
session- the session- Returns:
- true if success or if database is in non-exclusive mode already, false otherwise
-
getLobFileListCache
Description copied from interface:DataHandlerGet the lob file list cache if it is used.- Specified by:
getLobFileListCachein interfaceDataHandler- Returns:
- the cache or null
-
isSysTableLocked
public boolean isSysTableLocked()Checks if the system table (containing the catalog) is locked.- Returns:
- true if it is currently locked
-
isSysTableLockedBy
Checks if the system table (containing the catalog) is locked by the given session.- Parameters:
session- the session- Returns:
- true if it is currently locked
-
getLinkConnection
public TableLinkConnection getLinkConnection(String driver, String url, String user, String password) Open a new connection or get an existing connection to another database.- Parameters:
driver- the database driver or nullurl- the database URLuser- the user namepassword- the password- Returns:
- the connection
-
toString
-
shutdownImmediately
public void shutdownImmediately()Immediately close the database. -
getTempFileDeleter
Description copied from interface:DataHandlerGet the temp file deleter mechanism.- Specified by:
getTempFileDeleterin interfaceDataHandler- Returns:
- the temp file deleter
-
getFirstUserTable
Get the first user defined table, excluding the LOB_BLOCKS table that the Recover tool creates.- Returns:
- the table or null if no table is defined
-
checkpoint
public void checkpoint()Flush all changes and open a new transaction log. -
setReadOnly
public void setReadOnly(boolean readOnly) Switch the database to read-only mode.- Parameters:
readOnly- the new value
-
setCompactMode
public void setCompactMode(int compactMode) -
getCompiler
-
getLobStorage
Description copied from interface:DataHandlerGet the lob storage mechanism to use.- Specified by:
getLobStoragein interfaceDataHandler- Returns:
- the lob storage mechanism
-
getLobSession
-
getDefaultTableType
public int getDefaultTableType() -
setDefaultTableType
public void setDefaultTableType(int defaultTableType) -
getSettings
-
newStringMap
-
newStringMap
-
newConcurrentStringMap
Create a new hash map. Depending on the configuration, the key is case sensitive or case insensitive.- Type Parameters:
V- the value type- Returns:
- the hash map
-
equalsIdentifiers
-
sysIdentifier
-
isUpperSysIdentifier
-
readLob
public int readLob(long lobId, byte[] hmac, long offset, byte[] buff, int off, int length) Description copied from interface:DataHandlerRead from a lob.- Specified by:
readLobin interfaceDataHandler- Parameters:
lobId- the lob idhmac- the message authentication codeoffset- the offset within the lobbuff- the target bufferoff- the offset within the target bufferlength- the number of bytes to read- Returns:
- the number of bytes read
-
getFileEncryptionKey
public byte[] getFileEncryptionKey() -
getPageSize
public int getPageSize() -
getJavaObjectSerializer
Description copied from interface:CastDataProviderReturns the custom Java object serializer, ornull.- Specified by:
getJavaObjectSerializerin interfaceCastDataProvider- Returns:
- the custom Java object serializer, or
null
-
initJavaObjectSerializer
private void initJavaObjectSerializer() -
setJavaObjectSerializerName
-
getTableEngine
Get the table engine class, loading it if needed.- Parameters:
tableEngine- the table engine name- Returns:
- the class
-
getAuthenticator
get authenticator for database users- Returns:
- authenticator set for database
-
setAuthenticator
Set current database authenticator- Parameters:
authenticator- = authenticator to set, null to revert to the Internal authenticator
-
currentTimestamp
Description copied from interface:CastDataProviderReturns the current timestamp with maximum resolution. The value must be the same within a transaction or within execution of a command.- Specified by:
currentTimestampin interfaceCastDataProvider- Returns:
- the current timestamp for CURRENT_TIMESTAMP(9)
-
currentTimeZone
Description copied from interface:CastDataProviderReturns the current time zone.- Specified by:
currentTimeZonein interfaceCastDataProvider- Returns:
- the current time zone
-
zeroBasedEnums
public boolean zeroBasedEnums()Description copied from interface:CastDataProviderReturns are ENUM values 0-based.- Specified by:
zeroBasedEnumsin interfaceCastDataProvider- Returns:
- are ENUM values 0-based
-