org.wdssii.core.fam
Class FamIndexHelperInotifyImpl

java.lang.Object
  extended by org.wdssii.core.fam.FamIndexHelperInotifyImpl
All Implemented Interfaces:
net.contentobjects.jnotify.JNotifyListener, FamIndexHelper

public class FamIndexHelperInotifyImpl
extends Object
implements FamIndexHelper, net.contentobjects.jnotify.JNotifyListener


Field Summary
private  FilenameFilter filenamePattern
           
private  List<File> files
           
private  org.apache.commons.logging.Log log
           
private  int wd
           
 
Constructor Summary
FamIndexHelperInotifyImpl()
          By default look only at files that end with .fml
FamIndexHelperInotifyImpl(FilenameFilter pattern)
           
 
Method Summary
 void close()
          De-registers from the watch so that the servlet container does not keep receiving events.
 void fileCreated(int watch, String indexDir, String filename)
           
 void fileDeleted(int arg0, String arg1, String arg2)
           
 void fileModified(int arg0, String arg1, String arg2)
           
 void fileRenamed(int wd, String indexDir, String oldName, String newName)
           
 File[] getInitialFiles(String indexDir)
           
 File[] getNewFiles()
           
 void pruneToMaxSize(long m, long n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

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

files

private List<File> files

wd

private int wd

filenamePattern

private final FilenameFilter filenamePattern
Constructor Detail

FamIndexHelperInotifyImpl

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


FamIndexHelperInotifyImpl

public FamIndexHelperInotifyImpl(FilenameFilter pattern)
Method Detail

getInitialFiles

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

fileCreated

public void fileCreated(int watch,
                        String indexDir,
                        String filename)
Specified by:
fileCreated in interface net.contentobjects.jnotify.JNotifyListener

fileDeleted

public void fileDeleted(int arg0,
                        String arg1,
                        String arg2)
Specified by:
fileDeleted in interface net.contentobjects.jnotify.JNotifyListener

fileModified

public void fileModified(int arg0,
                         String arg1,
                         String arg2)
Specified by:
fileModified in interface net.contentobjects.jnotify.JNotifyListener

fileRenamed

public void fileRenamed(int wd,
                        String indexDir,
                        String oldName,
                        String newName)
Specified by:
fileRenamed in interface net.contentobjects.jnotify.JNotifyListener

getNewFiles

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

close

public void close()
De-registers from the watch so that the servlet container does not keep receiving events.

Specified by:
close in interface FamIndexHelper

pruneToMaxSize

public void pruneToMaxSize(long m,
                           long n)
Specified by:
pruneToMaxSize in interface FamIndexHelper