krati.core.segment
Class SegmentMeta
java.lang.Object
krati.core.segment.SegmentMeta
public class SegmentMeta
- extends Object
SegmentMeta: Meta Data for Segments
PREVIOUS-SECTION CURRENT-SECTION
SEGGEN SEGLOAD SEGGEN SEGLOAD
00000000 5 ? 6 ?
00000010 0 ? 0 ?
00000020 1 ? 0 ?
00000030 1 ? 1 ?
00000040 1 ? 1 ?
00000050 0 ? 1 ?
00000060 . . . .
- Author:
- jwu
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SegmentMeta
public SegmentMeta(File file)
throws IOException
- Throws:
IOException
getMetaFile
public File getMetaFile()
lock
public boolean lock()
throws IOException
- Throws:
IOException
unlock
public boolean unlock()
throws IOException
- Throws:
IOException
countSegmentsInService
public int countSegmentsInService()
hasSegmentInService
public boolean hasSegmentInService(int segmentId)
getSegmentLoadSize
public int getSegmentLoadSize(int segmentId)
getCapacity
public int getCapacity()
ensureCapacity
public void ensureCapacity(int segmentCount)
throws IOException
- Throws:
IOException
wrap
public void wrap(SegmentManager segmentManager)
throws IOException
- Wrap a segment manager and persist its meta data into the .meta file.
- Parameters:
segmentManager
- manager for segments
- Throws:
IOException
Copyright © 2011. All Rights Reserved.