segmentstore/server/src/main/java/io/pravega/segmentstore/server/logs/MemoryStateUpdater.java
void process(Iterator<Operation> operations) throws DataCorruptionException, CacheFullException {
        HashSet<Long> segmentIds = new HashSet<>();
        while (operations.hasNext()) {
            Operation op = operations.next();
            process(op);
            if (op instanceof SegmentOperation) {
                // Record recent activity on stream segment, if applicable. This should be recorded for any kind
                // of Operation that touches a Segment, since when we issue 'triggerFutureReads' on the readIndex,
                // it should include 'sealed' StreamSegments too - any Future Reads waiting on that Offset will be cancelled.
                segmentIds.add(((SegmentOperation) op).getStreamSegmentId());
            }
        }

        if (!this.recoveryMode.get()) {
            // Trigger Future Reads on those segments which were touched by Appends or Seals.
            this.readIndex.triggerFutureReads(segmentIds);
            if (this.commitSuccess != null) {
                this.commitSuccess.run();
            }
        }
    }
/**
     * Processes the given operations and applies them to the ReadIndex and InMemory OperationLog.
     *
     * @param operations An Iterator iterating over the operations to process (in sequence).
     * @throws DataCorruptionException If a serious, non-recoverable, data corruption was detected, such as trying to
     *                                 append operations out of order.
     * @throws CacheFullException If any operation in the given iterator contains data that needs to be added to the
     * {@link ReadIndex} but it could not be done due to the cache being full and unable to evict anything to make room
     * for more.
     */
Processes the given operations and applies them to the ReadIndex and InMemory OperationLog.
@param operations An Iterator iterating over the operations to process (in sequence).
@throws DataCorruptionException If a serious, non-recoverable, data corruption was detected, such as trying to
append operations out of order.
@throws CacheFullException If any operation in the given iterator contains data that needs to be added to the
ReadIndex but it could not be done due to the cache being full and unable to evict anything to make room
for more.
Processes the given operations and applies them to the ReadIndex and InMemory OperationLog . @param operations An Iterator iterating over the operations to process ( in sequence ) . @throws DataCorruptionException If a serious non - recoverable data corruption was detected such as trying to append operations out of order . @throws CacheFullException If any operation in the given iterator contains data that needs to be added to the ReadIndex but it could not be done due to the cache being full and unable to evict anything to make room for more .
void process(Iterator<Operation> operations) throws DataCorruptionException, CacheFullException {
        HashSet<Long> segmentIds = new HashSet<>();
        while (operations.hasNext()) {
            Operation op = operations.next();
            process(op);
            if (op instanceof SegmentOperation) {
                segmentIds.add(((SegmentOperation) op).getStreamSegmentId());
            }
        }
        if (!this.recoveryMode.get()) {
            this.readIndex.triggerFutureReads(segmentIds);
            if (this.commitSuccess != null) {
                this.commitSuccess.run();
            }
        }
    }
void process ( Iterator < Operation > operations ) throws DataCorruptionException , CacheFullException { HashSet < Long > segmentIds = new HashSet < > ( ) ; while ( operations . hasNext ( ) ) { Operation op = operations . next ( ) ; process ( op ) ; if ( op instanceof SegmentOperation ) { segmentIds . add ( ( ( SegmentOperation ) op ) . getStreamSegmentId ( ) ) ; } } if ( ! this . recoveryMode . get ( ) ) { this . readIndex . triggerFutureReads ( segmentIds ) ; if ( this . commitSuccess != null ) { this . commitSuccess . run ( ) ; } } }
Processes the given operations and applies them to the ReadIndex and InMemory OperationLog.
Processes the given operations and applies them to the ReadIndex and InMemory OperationLog .
// Record recent activity on stream segment, if applicable. This should be recorded for any kind // of Operation that touches a Segment, since when we issue 'triggerFutureReads' on the readIndex, // it should include 'sealed' StreamSegments too - any Future Reads waiting on that Offset will be cancelled. // Trigger Future Reads on those segments which were touched by Appends or Seals.