public class MemorySegmentList
extends java.lang.Object
Contains an ordered list of MemorySegment objects.
| Constructor and Description |
|---|
MemorySegmentList()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSegment(MemorySegment seg)
Add a segment to the list
|
int |
decrementHitCounts(int decr,
boolean remZero)
Decrement the read hit counts for all memory segments by the specified amount, and
optionally remove memory segments that have a hit count of zero.
|
MemorySegment |
findSegment(long fileOff,
int len)
Find the segment that contains the required data
|
MemorySegment |
getSegmentAt(int idx)
Return the specified memory segment
|
int |
numberOfSegments()
Return the count of memory segments
|
int |
removeSegments(int readLev)
Remove memory segments with a read count equal or below the specified level
|
public final void addSegment(MemorySegment seg)
seg - MemorySegmentpublic final MemorySegment getSegmentAt(int idx)
idx - intpublic final int numberOfSegments()
public final MemorySegment findSegment(long fileOff, int len)
fileOff - longlen - intpublic final int removeSegments(int readLev)
readLev - intpublic final int decrementHitCounts(int decr,
boolean remZero)
decr - intremZero - booleanCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.