blueflood-core/src/main/java/com/rackspacecloud/blueflood/service/ShardStateManager.java
protected Map<Granularity, Map<Integer, UpdateStamp>> getDirtySlotsToPersist(int shard) {
        Map<Granularity, Map<Integer, UpdateStamp>> slotTimes = new HashMap<Granularity, Map<Integer, UpdateStamp>>();
        int numUpdates = 0;
        for (Granularity gran : Granularity.rollupGranularities()) {
            Map<Integer, UpdateStamp> dirty = getSlotStateManager(shard, gran).getDirtySlotStampsAndMarkClean();
            slotTimes.put(gran, dirty);

            if (dirty.size() > 0) {
                numUpdates += dirty.size();
            }
        }
        if (numUpdates > 0) {
            // for updates that come by way of scribe, you'll typically see 5 as the number of updates (one for
            // each granularity).  On rollup slaves the situation is a bit different. You'll see only the slot
            // of the granularity just written to marked dirty (so 1).
            log.debug("Found {} dirty slots for shard {}", new Object[]{numUpdates, shard});
            return slotTimes;
        }
        return null;
    }
protected Map<Granularity, Map<Integer, UpdateStamp>> getDirtySlotsToPersist(int shard) {
        Map<Granularity, Map<Integer, UpdateStamp>> slotTimes = new HashMap<Granularity, Map<Integer, UpdateStamp>>();
        int numUpdates = 0;
        for (Granularity gran : Granularity.rollupGranularities()) {
            Map<Integer, UpdateStamp> dirty = getSlotStateManager(shard, gran).getDirtySlotStampsAndMarkClean();
            slotTimes.put(gran, dirty);

            if (dirty.size() > 0) {
                numUpdates += dirty.size();
            }
        }
        if (numUpdates > 0) {
            // for updates that come by way of scribe, you'll typically see 5 as the number of updates (one for
            // each granularity).  On rollup slaves the situation is a bit different. You'll see only the slot
            // of the granularity just written to marked dirty (so 1).
            log.debug("Found {} dirty slots for shard {}", new Object[]{numUpdates, shard});
            return slotTimes;
        }
        return null;
    }
protected Map < Granularity , Map < Integer , UpdateStamp > > getDirtySlotsToPersist ( int shard ) { Map < Granularity , Map < Integer , UpdateStamp > > slotTimes = new HashMap < Granularity , Map < Integer , UpdateStamp > > ( ) ; int numUpdates = 0 ; for ( Granularity gran : Granularity . rollupGranularities ( ) ) { Map < Integer , UpdateStamp > dirty = getSlotStateManager ( shard , gran ) . getDirtySlotStampsAndMarkClean ( ) ; slotTimes . put ( gran , dirty ) ; if ( dirty . size ( ) > 0 ) { numUpdates += dirty . size ( ) ; } } if ( numUpdates > 0 ) { // for updates that come by way of scribe, you'll typically see 5 as the number of updates (one for // each granularity).  On rollup slaves the situation is a bit different. You'll see only the slot // of the granularity just written to marked dirty (so 1). log . debug ( "Found {} dirty slots for shard {}" , new Object [ ] { numUpdates , shard } ) ; return slotTimes ; } return null ; }
Side effect: mark dirty slots as clean
Side effect : mark dirty slots as clean