|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectFairCom.CtreeDb.CTBase
public class CTBase
The CTBase Class is the basic class, upon which most of the other classes are built. In general, this class is not directly used. However, since most of the other classes are based on this, there are some important methods described in here that are applicable to most of the derived classes.
| Field Summary | |
|---|---|
protected CTHANDLE |
m_handle
|
| Constructor Summary | |
|---|---|
CTBase()
|
|
| Method Summary | |
|---|---|
void |
Abort()
Abort a transaction started with a call to Begin. |
void |
Begin()
Begin a transaction. |
void |
Commit()
Commit a transaction started with a call to Begin. |
boolean |
GetAutoCommit()
Retrieve c-treeDB auto commit flag. |
CTHANDLE |
GetHandle()
Returns the handle |
int |
GetKeepLock()
Retrieve the current extended keep lock mode. |
int |
GetLockMode()
Retrieve the current lock mode |
int |
GetOperation()
Retrieve operation modes for special performance-related functionality and test operational states for critical events. |
int |
GetTransactionMode()
Get the begin transaction mode |
boolean |
IsLockActive()
Indicate if locks are active. |
boolean |
IsTransActive()
Indicate if a transaction has been started with a call to Begin(), but not terminated with a call to Commit() or Abort(). |
boolean |
IsUnicodeLib()
Retrieves c-treeDB UNICODE mode. |
void |
Lock(int mode)
Enable or disable record locks |
void |
RestoreSavePoint(int SavePoint)
Restore a previously set save point. |
void |
SetAutoCommit(boolean flag)
Set the c-treeDB auto commit mode. |
void |
SetHandle(CTHANDLE Handle)
SetHandle |
void |
SetKeepLock(int mode)
Set the extended keep lock mode applied when an active transaction is commited or aborted by calling Abort or Commit. |
void |
SetOperation(int mode,
int state)
Set operation modes for special performance-related functionality and test operational states for critical events. |
int |
SetSavePoint()
Set a new transaction save point. |
void |
SetTransactionMode(int mode)
Set the begin transaction mode. |
void |
Unlock()
Disable record locks |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected CTHANDLE m_handle
| Constructor Detail |
|---|
public CTBase()
| Method Detail |
|---|
public boolean IsTransActive()
Begin(),
Commit(),
Abort()
public void Begin()
throws CTException
CTExceptionIsLockActive(),
Commit(),
Abort()
public void Commit()
throws CTException
CTExceptionIsLockActive(),
Commit(),
Abort()
public void Abort()
throws CTException
CTExceptionIsLockActive(),
Commit(),
Abort()
public int SetSavePoint()
throws CTException
CTExceptionBegin(),
Commit(),
Abort(),
RestoreSavePoint(int)
public void RestoreSavePoint(int SavePoint)
throws CTException
SavePoint - Previoulsy saved save point.
CTExceptionBegin(),
Commit(),
Abort(),
SetSavePoint()public CTHANDLE GetHandle()
public void SetHandle(CTHANDLE Handle)
Handle - Returns: nonepublic boolean GetAutoCommit()
SetAutoCommit(boolean)public boolean IsLockActive()
Lock(int),
GetLockMode(),
Unlock()public int GetLockMode()
public void Lock(int mode)
throws CTException
mode - One of the c-tree plus lock modes LOCK_MODE_*
CTExceptionGetLockMode(),
Unlock()
public void Unlock()
throws CTException
CTExceptionLock(int),
GetLockMode()public int GetKeepLock()
Lock(int),
GetLockMode()
public void SetKeepLock(int mode)
throws CTException
mode - one of the following keep lock modes:
CTKEEP_FREE release all locks. Clear LKISAM state. this is
the default mode when a session handle is allocated.
CTKEEP_LOCK keep all locks acquired before and during
transaction. Does not clear LKISAM state.
CTKEEP_OUT release only locks obtained within transaction
and/or locks on records updated within transaction. Does not clear LKISAM state.
CTKEEP_OUTALL unconditionally keep all locks acquired
before transaction began. Free locks obtained
obtained within the transaction. Does not clear LKISAM state.
CTExceptionGetKeepLock()
public void SetTransactionMode(int mode)
throws CTException
mode - Transaction begin mode. The possible values are:
CTBEGIN_NONE Reset the transaction begin mode.
CTBEGIN_PREIMG Transaction atomicity only. Auto-recovery is
not availabe. Mutually exclusive with CTBEGIN_TRNLOG.
CTBEGIN_TRNLOG Full transaction processing functionality
including auto-recovery.
This is the default begin transaction mode.
CTBEGIN_DEFER Defer begin transaction until update
CTBEGIN_AUTOSAVE Automatically invokes savepoints after each
successful record or resource update
CTExceptionBegin(),
Commit(),
Abort()public int GetTransactionMode()
SetTransactionMode(int),
Begin(),
Commit(),
Abort()
public void SetAutoCommit(boolean flag)
throws CTException
flag - Indicate of auto commit mode should be enabled or not.
CTExceptionGetAutoCommit()public int GetOperation()
public void SetOperation(int mode,
int state)
throws CTException
mode - Use a combination of the following modes:
OPS_LOCKON_GET Lock next fetch only.
OPS_UNLOCK_ADD Automatic unlock on add.
OPS_UNLOCK_RWT Automatic unlock on rewrite.
OPS_UNLOCK_UPD (OPS_UNLOCK_ADD | OPS_UNLOCK_RWT)
OPS_LOCKON_BLK Blocking lock on next fetch only.
OPS_FUNCTION_MON Toggle function monitor. (Server)
OPS_LOCK_MON Toggle lock monitor. (Server)
OPS_TRACK_MON Toggle memory track monitor. (Server)
OPS_MIRROR_NOSWITCH Don't continue if mirror or primary fails. (Server)
OPS_MIRROR_TRM A primary or mirror has been shutdown.
OPS_MEMORY_SWP Memory swapping active.
OPS_AUTOISAM_TRN Automatic ISAM transactions.
OPS_COMMIT_SWP Auto commit on swap occurred.
OPS_SERIAL_UPD Changes GetSerialNbr operation.
OPS_DEFER_CLOSE Defer file closes or deletes during transactions.
OPS_DISK_IO Set sysiocod on disk reads and writes.state - Use one of the following state values:
OPS_STATE_OFF Turn a status bit off.
OPS_STATE_SET Set the entire status word.
OPS_STATE_ON Turn a status bit on.
OPS_STATE_RET Return the entire status word.
CTExceptionpublic boolean IsUnicodeLib()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||