Class Reference
Cache for UNIX 2018.1.3
InterSystems: The power behind what matters   
Documentation  Search
Private  Storage  

persistent class Config.Journal extends %Persistent, Config.CommonSingleMethods, Config.CommonProperties, %SYSTEM.Help

This class allows you to modify and view the [Journal] section of the CPF file through programatic APIs. While properties are usually modified through the System Management portal, there may be some occasion where modifying them through the API's is best for your system. In all the Config methods, if you do not specify the CPFFile parameter, the currently active CPF file is used. If you wish to modify a CPF file which is not the currently active one, then specify the CPFFile you wish to modify in the method call.
The Flags parameter does not normally need to be specified; the defaults are usually sufficient for most cases.
You can use the provided API's (Get/Modify) to modify the properties by passing in the correct parameters.

NOTE: You cannot use object syntax to directly modify the [Journal] parameters. You MUST use the API's found in this class.


; Use class methods to modify properties
%SYS>s Status=##Class(Config.Journal).Get(.Properties)
%SYS>i Status w !,"Error="_$SYSTEM.Status.GetErrorText(Status)
%SYS>zw Properties
%SYS>s Properties("FileSizeLimit")=1024
%SYS>s Status=##Class(Config.Journal).Modify(.Properties)
%SYS>i Status w !,"Error="_$SYSTEM.Status.GetErrorText(Status)


Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 8 1


AlternateDirectory BackupsBeforePurge CPFFile Comments
CurrentDirectory DaysBeforePurge FileSizeLimit Flags
FreezeOnError JournalFilePrefix JournalcspSession Name

%AddToSaveSet %AddToSyncSet %BMEBuilt %CheckConstraints
%CheckConstraintsForExtent %ClassIsLatestVersion %ClassName %ComposeOid
%ConstructClone %Delete %DeleteExtent %DeleteId
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Exists
%ExistsId %Extends %GUID %GUIDSet
%GetLock %GetParameter %GetSwizzleObject %Id
%InsertBatch %IsA %IsModified %IsNull
%KillExtent %KillExtentData %LoadFromMemory %LockExtent
%LockId %New %NormalizeObject %ObjectIsNull
%ObjectModified %Oid %OnBeforeAddToSync %OnDetermineClass
%Open %OpenId %OriginalNamespace %PackageName
%PhysicalAddress %PurgeIndices %Reload %RemoveFromSaveSet
%ResolveConcurrencyConflict %RollBack %Save %SaveDirect
%SaveIndices %SerializeObject %SetModified %SortBegin
%SortEnd %SyncObjectIn %SyncTransport %UnlockExtent
%UnlockId %ValidateIndices %ValidateObject Get
GetList Help Modify Open
XMLDTD XMLExport XMLExportToStream XMLExportToString
XMLNew XMLSchema XMLSchemaNamespace XMLSchemaType


• parameter NOTRANSACTIONS = 1;
Setting this flag keeps the journal updates outside of a transaction When %Save() is called in the API's.


• property AlternateDirectory as %SysPath(MAXLEN=256);
Alternate journal directory.
• property BackupsBeforePurge as %Integer(MAXVAL=10,MINVAL=0) [ InitialExpression = 2,Required ];
Number of backups before the journal files are automatically purged.
• property CurrentDirectory as %SysPath(MAXLEN=256);
Primary journal directory.
• property DaysBeforePurge as %Integer(MAXVAL=100,MINVAL=0) [ InitialExpression = 2,Required ];
Number of days before the journal files are purged.
• property FileSizeLimit as %Integer(MAXVAL=4079,MINVAL=0) [ InitialExpression = 1024,Required ];
Maximum size of each journal file in MB.
• property FreezeOnError as Security.Datatype.BooleanYN [ InitialExpression = 0,Required ];
Freeze the system if there is an error writing to the journal.
If this option is set to true (1), as soon as the error occurs all global activities that are normally journaled are blocked, which causes other jobs to block. The typical outcome is that the system goes into a hang state until the journaling problem is resolved, and then resumes running. While Caché is hanging, the administrator can take corrective measures, such as freeing up space on a disk that is full, switching the journal to a new disk, etc. This option has the advantage that once the problem is fixed and Caché resumes running, no journal information has been lost. It has the disadvantage that the system is less available while the problem is being solved.
If this option is set to false (0), when a journaling error occurs journaling is entirely disabled, while the system continues running as normal. The system sends a console message to alert the administrator, who can fix the problem and then run ^JRNSWTCH at the console to restart journaling.
• property JournalFilePrefix as %String(MAXLEN=64,MINLEN=0);
Prefixes journal file names with this string.
May be used to distinguish journal files from different instances in the same directory.
• property JournalcspSession as Security.Datatype.BooleanYN [ InitialExpression = 0,Required ];
%cspSession global will be mapped to CACHETEMP and not journaled.


• index (CPFNameSectionHeaderName on CPFName,SectionHeader,Name) [IdKey,Unique];

Copyright © 1997-2020, InterSystems Corporation