code: 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;
      }
docs: Sets the Active SegmentChunk handle.
  
  @param handle The handle. Must not be read-only and for the last SegmentChunk.