* </p>
*
* @return <code>true</code> is at least one Segment is found to be eligible for compaction.
*/
private boolean inspect() {
SegmentManager segManager = _dataArray.getSegmentManager();
if(segManager == null) return false;
synchronized(segManager) {
Segment segCurrent = _dataArray.getCurrentSegment();
/*
* Find source segments that are least loaded.
* The source segments must be in the READ_ONLY mode.
*/
ArrayList<Segment> recycleList = new ArrayList<Segment>();
int cnt = segManager.getSegmentCount();
for(int i = 0; i < cnt; i++) {
Segment seg = segManager.getSegment(i);
if(seg != null && seg.getMode() == Segment.Mode.READ_ONLY && seg != segCurrent) {
if (seg.getLoadFactor() < _compactLoadFactor && !_ignoredSegs.contains(seg)) {
recycleList.add(seg);
}
}