org.wdssii.core.fam
Class FamIndexHelperLsImpl

java.lang.Object
  extended by org.wdssii.core.fam.FamIndexHelperLsImpl
All Implemented Interfaces:
FamIndexHelper

public class FamIndexHelperLsImpl
extends Object
implements FamIndexHelper

Author:
lakshman

Nested Class Summary
 class FamIndexHelperLsImpl.NewFilesOnly
          Accepts only new FML files
 
Field Summary
private  File[] emptyList
           
private  FilenameFilter filenamePattern
           
private  String indexDir
           
private  Set<String> knownFiles
           
private  org.apache.commons.logging.Log log
           
private  FamIndexHelperLsImpl.NewFilesOnly newFilesOnly
           
private  long timeOfLastUpdate
           
private  long updateIntervalInMilliSeconds
           
 
Constructor Summary
FamIndexHelperLsImpl()
          By default look only at files that end with .fml
FamIndexHelperLsImpl(FilenameFilter pattern)
           
 
Method Summary
 void close()
           
 File[] getInitialFiles(String indexDir)
           
 File[] getNewFiles()
           
private  File[] processFileListAndReturn(File[] files)
           
 void pruneToMaxSize(long maxNumRecords, long targetNumRecords)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

indexDir

private String indexDir

knownFiles

private Set<String> knownFiles

timeOfLastUpdate

private long timeOfLastUpdate

filenamePattern

private final FilenameFilter filenamePattern

newFilesOnly

private FamIndexHelperLsImpl.NewFilesOnly newFilesOnly

updateIntervalInMilliSeconds

private long updateIntervalInMilliSeconds

emptyList

private final File[] emptyList

log

private final org.apache.commons.logging.Log log
Constructor Detail

FamIndexHelperLsImpl

public FamIndexHelperLsImpl(FilenameFilter pattern)

FamIndexHelperLsImpl

public FamIndexHelperLsImpl()
By default look only at files that end with .fml

Method Detail

getInitialFiles

public File[] getInitialFiles(String indexDir)
Specified by:
getInitialFiles in interface FamIndexHelper

close

public void close()
Specified by:
close in interface FamIndexHelper

processFileListAndReturn

private File[] processFileListAndReturn(File[] files)

getNewFiles

public File[] getNewFiles()
Specified by:
getNewFiles in interface FamIndexHelper

pruneToMaxSize

public void pruneToMaxSize(long maxNumRecords,
                           long targetNumRecords)
Specified by:
pruneToMaxSize in interface FamIndexHelper