org.qi4j.io
Class Transforms.ProgressLog<T>

java.lang.Object
  extended by org.qi4j.io.Transforms.ProgressLog<T>
Type Parameters:
T - type of items to be transferred
All Implemented Interfaces:
Function<T,T>
Enclosing class:
Transforms

public static class Transforms.ProgressLog<T>
extends java.lang.Object
implements Function<T,T>

Track progress of transfer by emitting a log message in given intervals. If logger or format is null, then you need to override the logProgress to do something


Constructor Summary
Transforms.ProgressLog(org.slf4j.Logger logger, java.lang.String format, long interval)
           
Transforms.ProgressLog(long interval)
           
 
Method Summary
protected  void logProgress()
           
 T map(T t)
          Map a single item from one type to another
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transforms.ProgressLog

public Transforms.ProgressLog(org.slf4j.Logger logger,
                              java.lang.String format,
                              long interval)

Transforms.ProgressLog

public Transforms.ProgressLog(long interval)
Method Detail

map

public T map(T t)
Description copied from interface: Function
Map a single item from one type to another

Specified by:
map in interface Function<T,T>
Parameters:
t - the input item
Returns:
the mapped item

logProgress

protected void logProgress()