Package FairCom.CtreeDb.Types
Class OPEN_MODE
Object
OPEN_MODE
Open mode used on a
CTTable.Open(java.lang.String, int)
call-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Tables opened with this mode requires a record lock before a record can be updated.static final int
Tables opened with this mode requires a record lock as records are read.static final int
This mode opens tables with corrupted indexes or in certain cases, tables with corrupted data.static final int
Open only the data table.static final int
This mode opens the table as exclusive.static final int
Use this mode if no other open modes apply.static final int
Many operating systems and/or C compiler run-time libraries limit the number of files that can be opened at one time.static final int
Tables opened with this mode to force the internals to ignore the record definition and load the records as raw buffers.static final int
Opens the table in OPEN_MODE.READONLY mode and does not allow any modifications to the table structure or data records.static final int
Causes an internal call to ctdbUnlockTable() when the table is closed to remove any lock on the table -
Constructor Summary
-
Method Summary
-
Field Details
-
NORMAL
public static final int NORMALUse this mode if no other open modes apply.- See Also:
-
EXCLUSIVE
public static final int EXCLUSIVEThis mode opens the table as exclusive. If this mode is used, only one user can open a table. If an application already has the file open in any mode, no other application can open the table as OPEN_MODE.EXCLUSIVE. Once an application opens a table as CTOPEN_EXCLUSIVE, no other application can open it. Reads and writes are cached for index files opened with this file mode since there are no integrity issues with only one process in the file.- See Also:
-
PERMANENT
public static final int PERMANENTMany operating systems and/or C compiler run-time libraries limit the number of files that can be opened at one time. A permanent file open causes the file to be opened and stay open until the program executes a file close. A non-permanent file open causes the table data and index files to be opened, but allows them to be transparently closed and reopened to allow other data and index files to be used. When it is necessary for a data and index file to be temporarily closed, c-treeACE selects the least recently used file. This file remains closed until it is used, at which time it will be automatically reopened. This strategy causes c-treeACE to use all available file descriptors.- See Also:
-
CORRUPT
public static final int CORRUPTThis mode opens tables with corrupted indexes or in certain cases, tables with corrupted data. With c-treeDB this mode is usually used in conjunction with CTTable.Alter() mode to perform a rebuild if the indexes became corrupted: open table with OPEN_MODE.CORRUPT mode, then call CTTable.Alter() with ALTER_TABLE.INDEX mode to force the rebuild of all indices of the table. If a table table becomes corrupt, the table may be open with OPEN_MODE.CORRUPT mode and then CTTable.Alter() with ALTER_TABEL.FULL is invoked to try to recover the table.- See Also:
-
CHECKLOCK
public static final int CHECKLOCKTables opened with this mode requires a record lock before a record can be updated. If a lock is not obtained, the error code CTDBRET.DADV_ERR is returned.- See Also:
-
CHECKREAD
public static final int CHECKREADTables opened with this mode requires a record lock as records are read. Obtain at least a read lock on a record before it can be read, otherwise the function will return error code CTDBRET.DADV_ERR- See Also:
-
READONLY
public static final int READONLYOpens the table in OPEN_MODE.READONLY mode and does not allow any modifications to the table structure or data records.- See Also:
-
DATAONLY
public static final int DATAONLYOpen only the data table. Used to rebuild a table that may or may not be missing indices.- See Also:
-
UNLOCKONCLOSE
public static final int UNLOCKONCLOSECauses an internal call to ctdbUnlockTable() when the table is closed to remove any lock on the table- See Also:
-
RAW
public static final int RAWTables opened with this mode to force the internals to ignore the record definition and load the records as raw buffers. This mode forces the read only mode- See Also:
-
-
Constructor Details
-
OPEN_MODE
public OPEN_MODE()
-