coreRuntime/src/sc/sync/SyncManager.java
public void updateProperty(Object inst, String propName, boolean initOnly, boolean forceUpdate) {
         SyncProperties syncProps = getSyncPropertiesForInst(inst);
         if (syncProps == null) {
            System.err.println("*** Type for instance: " + DynUtil.getInstanceName(inst) + " not added to the SyncManager with addSyncType");
            return;
         }
         int flags = syncProps.getSyncFlags(propName);
         if (flags == -1) {
            System.err.println("*** Property: " + propName + " for instance: " + DynUtil.getInstanceName(inst) + " not added as a synchronized property to the SyncManager with addSyncType");
            return;
         }
         // This property gets initialized when the instance is added anyway so don't duplicate it here
         if ((flags & SyncPropOptions.SYNC_ON_DEMAND) != 0) {
            InstInfo ii = getInheritedInstInfo(inst);
            if (ii == null) {
               System.err.println("*** Unable to init sync property for instance which is not registered yet with the sync system: " + DynUtil.getInstanceName(inst));
               return;
            }
            // The instance has to be initialized.  for us to init the property.  It may be an on-demand instance which we have not gotten to yet.
            // If this object is initialized and initProperty adds the change, we are also done.  Otherwise, we may need to record the update.
            if (ii.initialized) {
               if (initProperty(null, inst, ii, propName, flags, false, syncProps, initOnly, getSyncListenerForGroup(syncProps.syncGroup), true, null))
                  return;
            }
            else {
               // Just mark that this property is fetched for this instance.  Later when we do initialize the instance we'll serialize it over
               ii.addFetchedOnDemand(propName, false);
            }
         }

         // Just initializing this property, not updating it.
         if (initOnly)
            return;

         Object curValue = DynUtil.getPropertyValue(inst, propName);

         if (forceUpdate || !DynUtil.equalObjects(getPreviousValue(inst, propName),curValue))
            addChangedValue(null, inst, propName, curValue, syncProps.syncGroup, null);
      }
/** Performs an update of the sync property specified.  It will initialize the property if necessary and force an update, even if the value has not changed, if forceUpdate is true. */
Performs an update of the sync property specified.  It will initialize the property if necessary and force an update, even if the value has not changed, if forceUpdate is true.
Performs an update of the sync property specified . It will initialize the property if necessary and force an update even if the value has not changed if forceUpdate is true .
public void updateProperty(Object inst, String propName, boolean initOnly, boolean forceUpdate) {
         SyncProperties syncProps = getSyncPropertiesForInst(inst);
         if (syncProps == null) {
            System.err.println("*** Type for instance: " + DynUtil.getInstanceName(inst) + " not added to the SyncManager with addSyncType");
            return;
         }
         int flags = syncProps.getSyncFlags(propName);
         if (flags == -1) {
            System.err.println("*** Property: " + propName + " for instance: " + DynUtil.getInstanceName(inst) + " not added as a synchronized property to the SyncManager with addSyncType");
            return;
         }
         if ((flags & SyncPropOptions.SYNC_ON_DEMAND) != 0) {
            InstInfo ii = getInheritedInstInfo(inst);
            if (ii == null) {
               System.err.println("*** Unable to init sync property for instance which is not registered yet with the sync system: " + DynUtil.getInstanceName(inst));
               return;
            }
            if (ii.initialized) {
               if (initProperty(null, inst, ii, propName, flags, false, syncProps, initOnly, getSyncListenerForGroup(syncProps.syncGroup), true, null))
                  return;
            }
            else {
               ii.addFetchedOnDemand(propName, false);
            }
         }
         if (initOnly)
            return;
         Object curValue = DynUtil.getPropertyValue(inst, propName);
         if (forceUpdate || !DynUtil.equalObjects(getPreviousValue(inst, propName),curValue))
            addChangedValue(null, inst, propName, curValue, syncProps.syncGroup, null);
      }
public void updateProperty ( Object inst , String propName , boolean initOnly , boolean forceUpdate ) { SyncProperties syncProps = getSyncPropertiesForInst ( inst ) ; if ( syncProps == null ) { System . err . println ( "*** Type for instance: " + DynUtil . getInstanceName ( inst ) + " not added to the SyncManager with addSyncType" ) ; return ; } int flags = syncProps . getSyncFlags ( propName ) ; if ( flags == - 1 ) { System . err . println ( "*** Property: " + propName + " for instance: " + DynUtil . getInstanceName ( inst ) + " not added as a synchronized property to the SyncManager with addSyncType" ) ; return ; } if ( ( flags & SyncPropOptions . SYNC_ON_DEMAND ) != 0 ) { InstInfo ii = getInheritedInstInfo ( inst ) ; if ( ii == null ) { System . err . println ( "*** Unable to init sync property for instance which is not registered yet with the sync system: " + DynUtil . getInstanceName ( inst ) ) ; return ; } if ( ii . initialized ) { if ( initProperty ( null , inst , ii , propName , flags , false , syncProps , initOnly , getSyncListenerForGroup ( syncProps . syncGroup ) , true , null ) ) return ; } else { ii . addFetchedOnDemand ( propName , false ) ; } } if ( initOnly ) return ; Object curValue = DynUtil . getPropertyValue ( inst , propName ) ; if ( forceUpdate || ! DynUtil . equalObjects ( getPreviousValue ( inst , propName ) , curValue ) ) addChangedValue ( null , inst , propName , curValue , syncProps . syncGroup , null ) ; }
Performs an update of the sync property specified.
Performs an update of the sync property specified .
// This property gets initialized when the instance is added anyway so don't duplicate it here // The instance has to be initialized.  for us to init the property.  It may be an on-demand instance which we have not gotten to yet. // If this object is initialized and initProperty adds the change, we are also done.  Otherwise, we may need to record the update. // Just mark that this property is fetched for this instance.  Later when we do initialize the instance we'll serialize it over // Just initializing this property, not updating it.