synchronized void setActiveChunkHandle ( SegmentHandle handle ) { Preconditions . checkArgument ( handle == null || ! handle . isReadOnly ( ) , "Active SegmentChunk handle cannot be readonly." ) ; SegmentChunk last = lastChunk ( ) ; Preconditions . checkState ( last != null , "Cannot set an Active SegmentChunk handle when there are no SegmentChunks." ) ; Preconditions . checkArgument ( handle == null || handle . getSegmentName ( ) . equals ( last . getName ( ) ) , "Active SegmentChunk handle must be for the last SegmentChunk." ) ; this . activeChunkHandle = handle ; }
Sets the Active SegmentChunk handle .