coreRuntime/src/sc/obj/CurrentScopeContext.java
public static void pushCurrentScopeContext(CurrentScopeContext state, boolean acquireLocks) {
      ArrayList<CurrentScopeContext> curStateList = (ArrayList<CurrentScopeContext>) PTypeUtil.getThreadLocal("scopeStateStack");
      if (curStateList == null) {
         curStateList = new ArrayList<CurrentScopeContext>();
         PTypeUtil.setThreadLocal("scopeStateStack", curStateList);
      }
      curStateList.add(state);
      if (curStateList.size() > MAX_STATE_LIST_SIZE)
         throw new IllegalArgumentException("Too many pushCurrentScopeContext calls in a row - max is: " + MAX_STATE_LIST_SIZE);

      // Need to dispatch any event listeners after the current context is set - otherwise, those events could just get queued up again
      if (state != null) {
         state.startScopeContext(acquireLocks);
      }
   }
/**
    * Call this to temporarily restore a CurrentScopeContext retrieved from getCurrentScopeContext.   You must call popScopeContext
    * in a finally clause after you've called this method.
    */
Call this to temporarily restore a CurrentScopeContext retrieved from getCurrentScopeContext.   You must call popScopeContext
in a finally clause after you've called this method.
Call this to temporarily restore a CurrentScopeContext retrieved from getCurrentScopeContext . You must call popScopeContext in a finally clause after you ' ve called this method .
public static void pushCurrentScopeContext(CurrentScopeContext state, boolean acquireLocks) {
      ArrayList<CurrentScopeContext> curStateList = (ArrayList<CurrentScopeContext>) PTypeUtil.getThreadLocal("scopeStateStack");
      if (curStateList == null) {
         curStateList = new ArrayList<CurrentScopeContext>();
         PTypeUtil.setThreadLocal("scopeStateStack", curStateList);
      }
      curStateList.add(state);
      if (curStateList.size() > MAX_STATE_LIST_SIZE)
         throw new IllegalArgumentException("Too many pushCurrentScopeContext calls in a row - max is: " + MAX_STATE_LIST_SIZE);
      if (state != null) {
         state.startScopeContext(acquireLocks);
      }
   }
public static void pushCurrentScopeContext ( CurrentScopeContext state , boolean acquireLocks ) { ArrayList < CurrentScopeContext > curStateList = ( ArrayList < CurrentScopeContext > ) PTypeUtil . getThreadLocal ( "scopeStateStack" ) ; if ( curStateList == null ) { curStateList = new ArrayList < CurrentScopeContext > ( ) ; PTypeUtil . setThreadLocal ( "scopeStateStack" , curStateList ) ; } curStateList . add ( state ) ; if ( curStateList . size ( ) > MAX_STATE_LIST_SIZE ) throw new IllegalArgumentException ( "Too many pushCurrentScopeContext calls in a row - max is: " + MAX_STATE_LIST_SIZE ) ; if ( state != null ) { state . startScopeContext ( acquireLocks ) ; } }
Call this to temporarily restore a CurrentScopeContext retrieved from getCurrentScopeContext.
Call this to temporarily restore a CurrentScopeContext retrieved from getCurrentScopeContext .
// Need to dispatch any event listeners after the current context is set - otherwise, those events could just get queued up again