blueflood-core/src/main/java/com/rackspacecloud/blueflood/service/ScheduleContext.java
void clearFromRunning(SlotKey slotKey) {
        synchronized (runningSlots) {
            runningSlots.remove(slotKey);
            UpdateStamp stamp = shardStateManager.getUpdateStamp(slotKey);
            shardStateManager.setAllCoarserSlotsDirtyForSlot(slotKey);

            //When state gets set to "X", before it got persisted, it might get scheduled for rollup
            //again, if we get delayed metrics. To prevent this we temporarily set last rollup time with current
            //time. This value wont get persisted.
            long currentTimeInMillis = clock.now().getMillis();
            stamp.setLastRollupTimestamp(currentTimeInMillis);
            log.debug("SlotKey {} is marked in memory with last rollup time as {}", slotKey, currentTimeInMillis);

            // Update the stamp to Rolled state if and only if the current state
            // is running. If the current state is active, it means we received
            // a delayed put which toggled the status to Active.
            if (stamp.getState() == UpdateStamp.State.Running) {
                stamp.setState(UpdateStamp.State.Rolled);
                // Note: Rollup state will be updated to the last ACTIVE
                // timestamp which caused rollup process to kick in.
                stamp.setDirty(true);
            }
        }
    }
void clearFromRunning(SlotKey slotKey) {
        synchronized (runningSlots) {
            runningSlots.remove(slotKey);
            UpdateStamp stamp = shardStateManager.getUpdateStamp(slotKey);
            shardStateManager.setAllCoarserSlotsDirtyForSlot(slotKey);

            //When state gets set to "X", before it got persisted, it might get scheduled for rollup
            //again, if we get delayed metrics. To prevent this we temporarily set last rollup time with current
            //time. This value wont get persisted.
            long currentTimeInMillis = clock.now().getMillis();
            stamp.setLastRollupTimestamp(currentTimeInMillis);
            log.debug("SlotKey {} is marked in memory with last rollup time as {}", slotKey, currentTimeInMillis);

            // Update the stamp to Rolled state if and only if the current state
            // is running. If the current state is active, it means we received
            // a delayed put which toggled the status to Active.
            if (stamp.getState() == UpdateStamp.State.Running) {
                stamp.setState(UpdateStamp.State.Rolled);
                // Note: Rollup state will be updated to the last ACTIVE
                // timestamp which caused rollup process to kick in.
                stamp.setDirty(true);
            }
        }
    }
void clearFromRunning ( SlotKey slotKey ) { synchronized ( runningSlots ) { runningSlots . remove ( slotKey ) ; UpdateStamp stamp = shardStateManager . getUpdateStamp ( slotKey ) ; shardStateManager . setAllCoarserSlotsDirtyForSlot ( slotKey ) ; //When state gets set to "X", before it got persisted, it might get scheduled for rollup //again, if we get delayed metrics. To prevent this we temporarily set last rollup time with current //time. This value wont get persisted. long currentTimeInMillis = clock . now ( ) . getMillis ( ) ; stamp . setLastRollupTimestamp ( currentTimeInMillis ) ; log . debug ( "SlotKey {} is marked in memory with last rollup time as {}" , slotKey , currentTimeInMillis ) ; // Update the stamp to Rolled state if and only if the current state // is running. If the current state is active, it means we received // a delayed put which toggled the status to Active. if ( stamp . getState ( ) == UpdateStamp . State . Running ) { stamp . setState ( UpdateStamp . State . Rolled ) ; // Note: Rollup state will be updated to the last ACTIVE // timestamp which caused rollup process to kick in. stamp . setDirty ( true ) ; } } }
Remove the given slot from the running group after it has been
successfully re-rolled.

@param slotKey
Remove the given slot from the running group after it has been successfully re - rolled .