coreRuntime/src/sc/sync/SyncManager.java
public void startSync(Object inst, String propName) {
         InstInfo ii = getInstInfo(inst);
         Boolean od;
         if (ii != null && ii.onDemandProps != null && ((od = ii.onDemandProps.get(propName)) != null) && od)
            return;
         SyncProperties syncProps = getSyncPropertiesForInst(inst);
         if (syncProps == null) {
            System.err.println("*** SyncManager.startSync: Type for instance: " + DynUtil.getInstanceName(inst) + " not added to the SyncManager with addSyncType");
            return;
         }
         int propOptions = syncProps.getSyncFlags(propName);
         if (propOptions == -1) {
            System.err.println("*** SyncManager.startSync: Property: " + propName + " for instance: " + DynUtil.getInstanceName(inst) + " not marked as synchronized in the addSyncType call.");
            return;
         }

         // If this property is not explicitly marked as either the client or the server, use the default for the destination - i.e. where the server is the web server, the browser is the client.
         // Ultimately we could make that assumption but it seems useful in the long term to allow the server to lazily pull on-demand properties from the client in the real time case.   Perhaps rare
         // in the browser/server case but maybe less so when sync is used for peer-to-peer.
         if ((propOptions & (SyncPropOptions.SYNC_SERVER | SyncPropOptions.SYNC_CLIENT)) == 0)
            propOptions = syncDestination.getDefaultSyncPropOptions();

         if ((propOptions & SyncPropOptions.SYNC_CLIENT) != 0) {
            fetchProperty(inst, propName);
         }
         else if ((propOptions & SyncPropOptions.SYNC_SERVER) != 0) {
            initProperty(inst, propName);
         }
         else
            throw new UnsupportedOperationException();

         if (childSyncInsts != null) {
            Set<InstInfo> childInstInfos = childSyncInsts.get(inst);
            if (childInstInfos != null) {
               for (InstInfo childInstInfo:childInstInfos) {
                  if (childInstInfo.syncContext == this)
                     System.err.println("*** Invalid childInstInfo in startSync!");
                  else {
                     childInstInfo.syncContext.startSync(inst, propName);
                  }
               }
            }
         }
      }
/**
       * This method lets you start the synchronization of an on-demand property, marked with @Sync(onDemand=true).
       * It can be called for either the client, the server, or both.  It's low cost to call it anytime you realize you
       * need to start synchronizing a property, like when a tree-node is opened.
       *
       * For the server, it adds that property to the synchronized set, so it's value is pushed to the client on the
       * next sync.  For the client, it initiates a "fetchProperty" operation.  The property will be set in processing
       * the results of the next sync.
       */
This method lets you start the synchronization of an on-demand property, marked with @Sync(onDemand=true).
It can be called for either the client, the server, or both.  It's low cost to call it anytime you realize you
need to start synchronizing a property, like when a tree-node is opened.

For the server, it adds that property to the synchronized set, so it's value is pushed to the client on the
next sync.  For the client, it initiates a "fetchProperty" operation.  The property will be set in processing
the results of the next sync.
This method lets you start the synchronization of an on - demand property marked with @Sync ( onDemand = true ) . It can be called for either the client the server or both . It ' s low cost to call it anytime you realize you need to start synchronizing a property like when a tree - node is opened . For the server it adds that property to the synchronized set so it ' s value is pushed to the client on the next sync . For the client it initiates a " fetchProperty " operation . The property will be set in processing the results of the next sync .
public void startSync(Object inst, String propName) {
         InstInfo ii = getInstInfo(inst);
         Boolean od;
         if (ii != null && ii.onDemandProps != null && ((od = ii.onDemandProps.get(propName)) != null) && od)
            return;
         SyncProperties syncProps = getSyncPropertiesForInst(inst);
         if (syncProps == null) {
            System.err.println("*** SyncManager.startSync: Type for instance: " + DynUtil.getInstanceName(inst) + " not added to the SyncManager with addSyncType");
            return;
         }
         int propOptions = syncProps.getSyncFlags(propName);
         if (propOptions == -1) {
            System.err.println("*** SyncManager.startSync: Property: " + propName + " for instance: " + DynUtil.getInstanceName(inst) + " not marked as synchronized in the addSyncType call.");
            return;
         }
         if ((propOptions & (SyncPropOptions.SYNC_SERVER | SyncPropOptions.SYNC_CLIENT)) == 0)
            propOptions = syncDestination.getDefaultSyncPropOptions();
         if ((propOptions & SyncPropOptions.SYNC_CLIENT) != 0) {
            fetchProperty(inst, propName);
         }
         else if ((propOptions & SyncPropOptions.SYNC_SERVER) != 0) {
            initProperty(inst, propName);
         }
         else
            throw new UnsupportedOperationException();
         if (childSyncInsts != null) {
            Set<InstInfo> childInstInfos = childSyncInsts.get(inst);
            if (childInstInfos != null) {
               for (InstInfo childInstInfo:childInstInfos) {
                  if (childInstInfo.syncContext == this)
                     System.err.println("*** Invalid childInstInfo in startSync!");
                  else {
                     childInstInfo.syncContext.startSync(inst, propName);
                  }
               }
            }
         }
      }
public void startSync ( Object inst , String propName ) { InstInfo ii = getInstInfo ( inst ) ; Boolean od ; if ( ii != null && ii . onDemandProps != null && ( ( od = ii . onDemandProps . get ( propName ) ) != null ) && od ) return ; SyncProperties syncProps = getSyncPropertiesForInst ( inst ) ; if ( syncProps == null ) { System . err . println ( "*** SyncManager.startSync: Type for instance: " + DynUtil . getInstanceName ( inst ) + " not added to the SyncManager with addSyncType" ) ; return ; } int propOptions = syncProps . getSyncFlags ( propName ) ; if ( propOptions == - 1 ) { System . err . println ( "*** SyncManager.startSync: Property: " + propName + " for instance: " + DynUtil . getInstanceName ( inst ) + " not marked as synchronized in the addSyncType call." ) ; return ; } if ( ( propOptions & ( SyncPropOptions . SYNC_SERVER | SyncPropOptions . SYNC_CLIENT ) ) == 0 ) propOptions = syncDestination . getDefaultSyncPropOptions ( ) ; if ( ( propOptions & SyncPropOptions . SYNC_CLIENT ) != 0 ) { fetchProperty ( inst , propName ) ; } else if ( ( propOptions & SyncPropOptions . SYNC_SERVER ) != 0 ) { initProperty ( inst , propName ) ; } else throw new UnsupportedOperationException ( ) ; if ( childSyncInsts != null ) { Set < InstInfo > childInstInfos = childSyncInsts . get ( inst ) ; if ( childInstInfos != null ) { for ( InstInfo childInstInfo : childInstInfos ) { if ( childInstInfo . syncContext == this ) System . err . println ( "*** Invalid childInstInfo in startSync!" ) ; else { childInstInfo . syncContext . startSync ( inst , propName ) ; } } } } }
This method lets you start the synchronization of an on-demand property, marked with @Sync(onDemand=true).
This method lets you start the synchronization of an on - demand property marked with @Sync ( onDemand = true ) .
// If this property is not explicitly marked as either the client or the server, use the default for the destination - i.e. where the server is the web server, the browser is the client. // Ultimately we could make that assumption but it seems useful in the long term to allow the server to lazily pull on-demand properties from the client in the real time case.   Perhaps rare // in the browser/server case but maybe less so when sync is used for peer-to-peer.