%SYS
System Class Reference

Journaling related API. More...

Inheritance diagram for System:
Collaboration diagram for System:

Static Public Member Functions

_.Library.Status ActivateEncryption (_.Library.Boolean EnableStartup)
 Activate journal encryption such that new updates go to encrypted. More...
 
_.Library.Status DeactivateEncryption (_.Library.Boolean DisableStartup)
 Deactivate journal encryption such that new updates go to unencrypted. More...
 
_.Library.String GetAlternateDirectory (_.Library.Status Status)
 Return the path of the secondary journal directory.
 
_.Library.String GetClusterJournalLog ()
 Return the path of the cluster journal log.
 
_.SYS.Journal.File GetCurrentFile ()
 Return the object reference to current journal file.
 
_.Library.Integer GetCurrentFileCount ()
 Return the file count of current journal file.
 
_.Library.String GetCurrentFileName ()
 Return the path of current journal file.
 
_.Library.Integer GetCurrentFileOffset ()
 Returns the ending offset of the last journal record in current journal file;. More...
 
_.Library.Integer GetFreeSpace ()
 Return the free space available for journal files.
 
_.Library.Status GetImageJournalInfo (_.Library.String JournalFileName, _.Library.Integer JournalFileOffset, _.Library.Integer JournalFileCount, _.Library.Integer OpenTransFileOffset, _.Library.Integer OpenTransFileCount)
 Return the journal checkpoint information stored in the WIJ (aka Write Image Journal)
 
_.Library.String GetJournalFilePrefix ()
 Return the journal file name prefix.
 
_.Library.String GetLastFileName ()
 Get the path of the last journal file on the system – meaningful only if. More...
 
_.Library.String GetPrimaryDirectory (_.Library.Status Status)
 Return the path of the primary journal directory, which is not necessarily the current journal directory.
 
_.Library.Integer GetState ()
 Returns the state of the journaling system as an Integer
More...
 
_.Library.String GetStateString ()
 Returns the state of the journaling system as a string. More...
 
_.Library.Integer GetTheOtherDirectory (_.Library.String Directory, _.Library.Integer Type)
 Get the path of the journal directory other than the current one. More...
 
_.Library.Boolean IsDisabled (_.Library.String Status, _.Library.String Cause)
 TRUE if journaling is disabled system wide.
 
_.Library.Boolean IsEncKeyInUse (_.Library.String DBEncKeyID)
 TRUE if the given DBEncKeyID is used on journal files required for recovery.
 
_.Library.Boolean IsFrozen (_.Library.String Status, _.Library.String Cause)
 TRUE if journaling is frozen system wide (i.e., journal updates are blocked), typically. More...
 
_.Library.Boolean IsGettingIOError (_.Library.String Status, _.Library.String Cause)
 TRUE if there is a journaling error, from which the system may be trying to recover.
 
_.Library.Integer IsJournalEncryptionEnabled (_.Library.Integer Type)
 Return current journal encryption status. More...
 
_.Library.Boolean IsPaused (_.Library.String Status, _.Library.String Cause)
 TRUE if journaling is paused system wide (when there is an ongoing journal switch)
 
_.Library.Status OKNoDBEncKeyAtStartup (_.Library.Boolean LocalOnly)
 Return OK if DBEncKey is not required at startup (i.e., OK to disable. More...
 
_.Library.Status OKNoDBEncKeyNow ()
 Return OK if DBEncKey is not required for individual jobs to roll back. More...
 
_.Library.Status RollToNextFile (_.Library.Integer Reason, _.Library.String NewFile)
 Purpose: Roll journaling to next file, without any journal property change (to activate) More...
 
_.Library.Status Start (_.Library.String curdir, _.Library.String altdir, _.Library.Integer maxsiz, _.Library.Integer expsiz, _.Library.String prefix, _.Library.Boolean okshdw)
 Purpose: Start journaling. More...
 
_.Library.Status Stop ()
 Purpose: Stop journaling system wide.
 
_.Library.Status SwitchDirectory (_.Library.String NewFile)
 Switch journaling to the other journal directory if specified
More...
 
_.Library.Status SwitchFile (_.Library.String curdir, _.Library.String altdir, _.Library.Integer maxsiz, _.Library.Integer expsiz, _.Library.Boolean okshdw, _.Library.Integer reason)
 Purpose: Switch journal file (and optionally change one or more journaling parameters) More...
 
_.Library.Integer Sync ()
 Purpose: Sync (commit) journal data to disk. More...
 
_.Library.Integer WhereCommitted ()
 Purpose: Report what portion of the journal has been committed to disk. More...
 

Detailed Description

Journaling related API.

Member Function Documentation

◆ ActivateEncryption()

_.Library.Status ActivateEncryption ( _.Library.Boolean  EnableStartup)
static

Activate journal encryption such that new updates go to encrypted.

journal files.

◆ DeactivateEncryption()

_.Library.Status DeactivateEncryption ( _.Library.Boolean  DisableStartup)
static

Deactivate journal encryption such that new updates go to unencrypted.

journal files.

◆ GetCurrentFileOffset()

_.Library.Integer GetCurrentFileOffset ( )
static

Returns the ending offset of the last journal record in current journal file;.

0 if journaling is off

◆ GetLastFileName()

_.Library.String GetLastFileName ( )
static

Get the path of the last journal file on the system – meaningful only if.

current journal file name = "" (i.e., journaling hasn't started)

◆ GetState()

_.Library.Integer GetState ( )
static

Returns the state of the journaling system as an Integer

0 - Enabled
1 - Disabled (stopped)
2 - Suspended (due to I/O error)
3 - Frozen (due to I/O error)
4 - Paused (during journal file switch)

◆ GetStateString()

_.Library.String GetStateString ( )
static

Returns the state of the journaling system as a string.

Values are:

"Normal" (Enabled and running normally)
"Disabled" (stopped)
"Suspended" (due to I/O error)
"Frozen" (due to I/O error)
"Paused" (during journal file switch)

Frozen and Suspended are the same state (I/O error occurred), but they differ in the action processes take (freeze or discard journal data respectively) when they encounter this state.

◆ GetTheOtherDirectory()

_.Library.Integer GetTheOtherDirectory ( _.Library.String  Directory,
_.Library.Integer  Type 
)
static

Get the path of the journal directory other than the current one.


Directory: The journal directory different from the current one or "" if none
Type: 1 if Directory is Primary or 2 if Directory is Secondary or 0 if Directory is "" (meaning no other directory)

◆ IsFrozen()

_.Library.Boolean IsFrozen ( _.Library.String  Status,
_.Library.String  Cause 
)
static

TRUE if journaling is frozen system wide (i.e., journal updates are blocked), typically.

when there is a journaling error and the system is set up to freeze on such errors.

◆ IsJournalEncryptionEnabled()

_.Library.Integer IsJournalEncryptionEnabled ( _.Library.Integer  Type)
static

Return current journal encryption status.


Type - 1: Run time journal encryption status (default).
2: Startup journal encryption status.
3: Run time or Startup encryption status.
Retrun 1 if journal encryption status is enabled, otherwise return 0.

◆ OKNoDBEncKeyAtStartup()

_.Library.Status OKNoDBEncKeyAtStartup ( _.Library.Boolean  LocalOnly)
static

Return OK if DBEncKey is not required at startup (i.e., OK to disable.

DBEncKey activation at startup); otherwise, return an error indicating why DBEncKey must be activated at startup.

◆ OKNoDBEncKeyNow()

_.Library.Status OKNoDBEncKeyNow ( )
static

Return OK if DBEncKey is not required for individual jobs to roll back.

their own open transactions (i.e., OK to deactivate DBEncKey); otherwise, return an error indicating why DBEncKey must stay activated.

◆ RollToNextFile()

_.Library.Status RollToNextFile ( _.Library.Integer  Reason,
_.Library.String  NewFile 
)
static

Purpose: Roll journaling to next file, without any journal property change (to activate)

Input:

  • Reason: reason for the switch (0 = unspecified, 1 = user-initiated, etc.);

Output:

  • NewFile: the path of the file to which journaling has switched (if successfully)

Return success or error status.

Caveat: Journal history global is NOT updated, a la journal daemon

◆ Start()

_.Library.Status Start ( _.Library.String  curdir,
_.Library.String  altdir,
_.Library.Integer  maxsiz,
_.Library.Integer  expsiz,
_.Library.String  prefix,
_.Library.Boolean  okshdw 
)
static

Purpose: Start journaling.

Optional parameters for journaling:

  • curdir: primary journal directory
  • altdir: alternate journal directory
  • maxsiz: max size of journal file in bytes
  • expsiz: [Windows & VMS only] unit increment of journal file size in bytes
  • prefix: a string preceding the standard journal file name YYYYMMDD.NNN

shdwok: OK to share directory with shadow journal files despite potential file conflicts (DEFAULT = 0) Returns OK on success

◆ SwitchDirectory()

_.Library.Status SwitchDirectory ( _.Library.String  NewFile)
static

Switch journaling to the other journal directory if specified

Return (by reference) the path of current journal file after a successful switch.

◆ SwitchFile()

_.Library.Status SwitchFile ( _.Library.String  curdir,
_.Library.String  altdir,
_.Library.Integer  maxsiz,
_.Library.Integer  expsiz,
_.Library.Boolean  okshdw,
_.Library.Integer  reason 
)
static

Purpose: Switch journal file (and optionally change one or more journaling parameters)

Optional parameters for journaling:

  • curdir: primary journal directory
  • altdir: alternate journal directory
  • maxsiz: max size of journal file in bytes
  • expsiz: [Windows & VMS only] unit increment of journal file size in bytes
  • shdwok: OK to share directory with shadow journal files despite potential file conflicts (DEFAULT = 0)
  • reason: reason for journal switch (DEFAULT: by user)

Returns OK on success

◆ Sync()

_.Library.Integer Sync ( )
static

Purpose: Sync (commit) journal data to disk.

Returns a journal offset. It is guaranteed that journal data at or prior to the offset are on disk by the time Sync() returns.

Caveat: It is possible that journal file has been switched by the time Sync() returns. In that case, it is unpredictable which journal file the returned offset refers to and one might have to repeat Sync() until journal file remains the same before and after.

◆ WhereCommitted()

_.Library.Integer WhereCommitted ( )
static

Purpose: Report what portion of the journal has been committed to disk.

Returns a journal offset. It is guaranteed that journal data at or prior to the offset are on disk.

Caveat: see <method>Sync</method>