%SYS.Journal.System
abstract class %SYS.Journal.System extends %Library.RegisteredObject
Journaling related APIMethod Inventory
- ActivateEncryption()
- DeactivateEncryption()
- GetAlternateDirectory()
- GetClusterJournalLog()
- GetCurrentFile()
- GetCurrentFileCount()
- GetCurrentFileName()
- GetCurrentFileOffset()
- GetFreeSpace()
- GetImageJournalInfo()
- GetJournalFilePrefix()
- GetLastFileName()
- GetPrimaryDirectory()
- GetState()
- GetStateString()
- GetTheOtherDirectory()
- IsDisabled()
- IsFrozen()
- IsGettingIOError()
- IsJournalEncryptionEnabled()
- IsPaused()
- OKNoDBEncKeyAtStartup()
- OKNoDBEncKeyNow()
- RollToNextFile()
- SetAlternateDirectory()
- SetJournalFilePrefix()
- SetPrimaryDirectory()
- Start()
- Stop()
- SwitchDirectory()
- SwitchFile()
- Sync()
- WhereCommitted()
Methods
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)
"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.
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)
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.
Input:
- Reason: reason for the switch (0 = unspecified, 1 = user-initiated, etc.);
- NewFile: the path of the file to which journaling has switched (if successfully)
Caveat: Journal history global is NOT updated, a la journal daemon
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
Return (by reference) the path of current journal file after a successful switch.
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 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.
Returns a journal offset. It is guaranteed that journal data at or prior to the offset are on disk.
Caveat: see Sync()
Queries
s rs=##class(%ResultSet).%New("%SYS.Journal.System:Progress") s rc=rs.Execute() w rc while rs.Next() { w $zdt(rs.Data("TimeStamp"),8),": ",$j(rs.Data("Offset"),10)," ",rs.Data("File Name"),! h 10 }
Example:
s rs=##class(%RemoteResultSet).%New("%SYS.Journal.System:Status") s rs.UserName="_system" s rs.Password="sys" s rs.ConnectionString="hostname[port]:%SYS" s rc=rs.Execute() w rc while rs.Next() { w rs.Data("Main Status"),! h 10 }
Example:
s rs=##class(%ResultSet).%New("%SYS.Journal.System:Summary") s rc=rs.Execute() w !,rs.GetColumnHeader(1),?40," ",rs.GetColumnHeader(2),! while rs.Next() { w !,rs.Data("Parameter"),?40," ",rs.Data("Value") }
Inherited Members
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()