Home > Class Reference > ENSLIB namespace > %SYNC.SyncSet


class %SYNC.SyncSet extends %Library.RegisteredObject

Caché Objects provides a toolkit for synchronizing objects of selected types between namespaces containing compatible type classes. The core of the synchronization toolkit is the SyncSet. A SyncSet contains all of the objects of selected types that have been filed in the local database from a defined starting time up to an ending time. "Time" in the context of synchronization means a sequencing value and is not an "hours-minutes-seconds" value. Object Synchronization consists of three primary tasks. The first task is to build the SyncSet. That task involves determining which objects are to included in the SyncSet. Caché uses a transaction journal for that purpose. The transaction journal is implemented as %Library.ObjectJournalTransaction. Any persistent or serial class that declares the class parameter OBJJOURNAL as true will record all filing events in %Library.ObjectJournalTransaction. The second task is to add changed objects to the SyncSet. The most common mechanism for performing this task is to retrieve the object state from the system journal using information recorded in %Library.ObjectJournalTransaction. This mechanism allows historical object data to be included in the SyncSet. If the system journal is not available, there is a provision to include the current object state. The third task is to import the SyncSet into the namespace being synchronized. This involves loading the SyncSet global into the target namespace and then importing each object contained in the SyncSet. If an object being imported already exists in the target namespace then the timestamp for the imported object is compared to the timestamp of the existing object. If a conflict is detected then user implemented code is called to resolve the conflict. This is essentially an optimistic concurrency mechanism. If the conflict is not resolved successfully then a concurrency error is reported and the object is not synchronized.

Property Inventory (Including Private)

Method Inventory (Including Private)

Properties (Including Private)

property Exclude as %String [ Private ];
Property methods: ExcludeDisplayToLogical(), ExcludeGet(), ExcludeIsValid(), ExcludeLogicalToDisplay(), ExcludeLogicalToOdbc(), ExcludeNormalize(), ExcludeSet()
property FilterObject as %RegisteredObject;
Property methods: FilterObjectGet(), FilterObjectGetSwizzled(), FilterObjectIsValid(), FilterObjectNewObject(), FilterObjectSet()
property FirstTransaction as %Integer [ Private ];
Property methods: FirstTransactionDisplayToLogical(), FirstTransactionGet(), FirstTransactionIsValid(), FirstTransactionLogicalToDisplay(), FirstTransactionNormalize(), FirstTransactionSet()
property LastTransaction as %Integer [ Private ];
Property methods: LastTransactionDisplayToLogical(), LastTransactionGet(), LastTransactionIsValid(), LastTransactionLogicalToDisplay(), LastTransactionNormalize(), LastTransactionSet()
property ResolveConflictEnv as %RegisteredObject;
Property methods: ResolveConflictEnvGet(), ResolveConflictEnvGetSwizzled(), ResolveConflictEnvIsValid(), ResolveConflictEnvNewObject(), ResolveConflictEnvSet()
property SyncSystem as %String;
This is the sysID of the system that produced the SyncSet
Property methods: SyncSystemDisplayToLogical(), SyncSystemGet(), SyncSystemIsValid(), SyncSystemLogicalToDisplay(), SyncSystemLogicalToOdbc(), SyncSystemNormalize(), SyncSystemSet()
property Unresolved as %Integer;
Unresolved is set to point to the first unresolved object in the sync set once Import() has completed. If there are no unresolved objects then this value will be empty (not > 0).
Property methods: UnresolvedDisplayToLogical(), UnresolvedFirst(), UnresolvedGet(), UnresolvedIsValid(), UnresolvedLogicalToDisplay(), UnresolvedNext(), UnresolvedNormalize(), UnresolvedSet()
property sId as %String;
Sync Set ID

This is a string value used to identify the Sync Set object. This value is used as the suffix to the global name root of ^OBJ.SYNC.. For example, if the sId is set to the integer 1 then the global name will be ^OBJ.SYNC.1.

Property methods: sIdDisplayToLogical(), sIdGet(), sIdIsValid(), sIdLogicalToDisplay(), sIdLogicalToOdbc(), sIdNormalize(), sIdSet()

Methods (Including Private)

private method %OnClose() as %Status
This callback method is invoked by the %Close() method to provide notification that the current object is being closed.

The return value of this method is ignored.

private method %OnNew(initvalue As %CacheString) as %Status
This callback method is invoked by the %New() method to provide notification that a new instance of an object is being created.

If this method returns an error then the object will not be created.

method AddJournaledObject(iTranPtr As %Integer = 0, iObjPtr As %Integer = 0, srcSystem As %String, srcNS As %String) as %Integer
method AddJournaledTransaction(iTranPtr As %Integer = 0, lExclude As %List = "") as %Integer