com.bigdata.service.jini.master
Class FileSystemScanner

java.lang.Object
  extended by com.bigdata.service.jini.master.AbstractResourceScanner<File>
      extended by com.bigdata.service.jini.master.FileSystemScanner
All Implemented Interfaces:
Callable<Long>

public class FileSystemScanner
extends AbstractResourceScanner<File>

Adds all files accepted by the filter to the Queue.

Version:
$Id$
Author:
Bryan Thompson

Field Summary
protected  File fileOrDir
           
protected  FilenameFilter filter
           
 
Fields inherited from class com.bigdata.service.jini.master.AbstractResourceScanner
log
 
Constructor Summary
FileSystemScanner(BlockingBuffer<File[]> buffer, File fileOrDir, FilenameFilter filter)
           
 
Method Summary
static IResourceScannerFactory<File> newFactory(File fileOrDir, FilenameFilter filter)
          Factory for factory.
protected  void runScanner()
          Run the scanner.
 
Methods inherited from class com.bigdata.service.jini.master.AbstractResourceScanner
accept, call, getAcceptCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileOrDir

protected final File fileOrDir

filter

protected final FilenameFilter filter
Constructor Detail

FileSystemScanner

public FileSystemScanner(BlockingBuffer<File[]> buffer,
                         File fileOrDir,
                         FilenameFilter filter)
Parameters:
buffer - Chunks of files to be loaded are added to this buffer.
fileOrDir - The file or directory to be loaded.
filter - An optional filter on files that will be accepted when processing a directory.
Method Detail

runScanner

protected void runScanner()
                   throws Exception
Description copied from class: AbstractResourceScanner
Run the scanner.

Specified by:
runScanner in class AbstractResourceScanner<File>
Throws:
Exception

newFactory

public static IResourceScannerFactory<File> newFactory(File fileOrDir,
                                                       FilenameFilter filter)
Factory for factory.



Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.