Opens the segments.
484306
private void open() {
    // Load existing log segments from disk.
    for (JournalSegment<E> segment : loadSegments()) {
      segments.put(segment.descriptor().index(), segment);
    }

    // If a segment doesn't already exist, create an initial segment starting at index 1.
    if (!segments.isEmpty()) {
      currentSegment = segments.lastEntry().getValue();
    } else {
      JournalSegmentDescriptor descriptor = JournalSegmentDescriptor.builder()
          .withId(1)
          .withIndex(1)
          .withMaxSegmentSize(maxSegmentSize)
          .withMaxEntries(maxEntriesPerSegment)
          .build();

      currentSegment = createSegment(descriptor);
      currentSegment.descriptor().update(System.currentTimeMillis());

      segments.put(1L, currentSegment);
    }
  }
961883
def segments(self, using=None, **kwargs):
        
        return self._get_connection(using).indices.segments(index=self._name, **kwargs)
792170
void open() throws IOException {
        ListIterator<Appender> ite = appenderList.listIterator();
        while (ite.hasNext()) {
            Appender p = ite.next();
            if (p != null) p.open();
        }
    }
854065
def find_segment_first(self, *args, **kwargs):
        """"""

        for m in self.find_segments(*args, **kwargs):
            return m

        return None
459883
def segments
      EXPORT.map do |sym|
        seg = __send__(sym)
        [sym, seg] if seg.is_a?(Segment)
      end.compact.to_h
    end
863348
public static void decodePathSegment(List<PathSegment> segments, String segment, boolean decode) {
        int colon = segment.indexOf(';');
        if (colon != -1) {
            segments.add(new PathSegmentImpl(
                    (colon == 0) ? "" : segment.substring(0, colon),
                    decode,
                    decodeMatrix(segment, decode)));
        } else {
            segments.add(new PathSegmentImpl(
                    segment,
                    decode));
        }
    }
328770
public OutSegment openWriterGc(long sequence)
  {
    int segmentSize = _segmentSizeGc;
    
    SegmentKelp segment = _segmentService.createSegment(segmentSize, getTableKey(), sequence);
    
    addTableSegmentLength(segmentSize);
    
    return new OutSegment(_table, _table.getTableService(), this, segment);
  }
1028800
def segments(self):
        '''
        

        '''
        return [Segment(self.AB),
                Segment(self.BC),
                Segment(self.AC)]
1256174
private Segment currentSegment() {
    Segment segment = segments.currentSegment();
    if (segment.isFull()) {
      segments.currentSegment().flush();
      segment = segments.nextSegment();
    }
    return segment;
  }
306739
public synchronized Segment firstSegment() {
    assertOpen();
    Map.Entry<Long, Segment> segment = segments.firstEntry();
    return segment != null ? segment.getValue() : null;
  }
1289543
def segments(name)
      result = call("segments", "segments", {:name => name})

      result["segments"].collect {|item| Segment.new(self, item)}
    end
1251402
private void freeCompactedSegments() {
        SegmentManager segManager = _dataArray.getSegmentManager();
        if(segManager == null) return;
        
        while(!_freeQueue.isEmpty()) {
            Segment seg = _freeQueue.remove();
            try {
                segManager.freeSegment(seg);
            } catch(Exception e) {
                _log.error("failed to free Segment " + seg.getSegmentId() + ": " + seg.getStatus(), e);
            }
        }
    }
885043
JournalSegment<E> resetSegments(long index) {
    assertOpen();

    // If the index already equals the first segment index, skip the reset.
    JournalSegment<E> firstSegment = getFirstSegment();
    if (index == firstSegment.index()) {
      return firstSegment;
    }

    for (JournalSegment<E> segment : segments.values()) {
      segment.close();
      segment.delete();
    }
    segments.clear();

    JournalSegmentDescriptor descriptor = JournalSegmentDescriptor.builder()
        .withId(1)
        .withIndex(index)
        .withMaxSegmentSize(maxSegmentSize)
        .withMaxEntries(maxEntriesPerSegment)
        .build();
    currentSegment = createSegment(descriptor);
    segments.put(index, currentSegment);
    return currentSegment;
  }
1031358
def add_segments(self, segments):
        
        self.tracks.update([seg.track for seg in segments])
        self.segments.extend(segments)
177174
private SegmentAndOffset firstSegmentAndOffset(int segSize) {
		int segIndex = offset / segSize;
		return new SegmentAndOffset(segIndex, offset % segSize);
	}
1017568
public void open() {
		if (!close) {
            open = true;
        }
        DocListener listener;
		for (Iterator iterator = listeners.iterator(); iterator.hasNext();) {
            listener = (DocListener) iterator.next();
            listener.setPageSize(pageSize);
			listener.setMargins(marginLeft, marginRight, marginTop,
					marginBottom);
            listener.open();
        }
    }
1091825
public void setSegments(java.util.Collection<Segment> segments) {
        if (segments == null) {
            this.segments = null;
            return;
        }

        this.segments = new java.util.ArrayList<Segment>(segments);
    }