org.databene.benerator.storage
Class StorageSystemConsumer

java.lang.Object
  extended by org.databene.benerator.consumer.AbstractConsumer
      extended by org.databene.benerator.storage.StorageSystemConsumer
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, Consumer, org.databene.commons.ThreadAware
Direct Known Subclasses:
StorageSystemInserter, StorageSystemUpdater

public abstract class StorageSystemConsumer
extends AbstractConsumer
implements org.databene.commons.ThreadAware

Stores an Entity in the associated StorageSystem. It replaces the class SystemProcessor.

Created: 29.01.2008 09:35:07

Since:
0.4.0
Author:
Volker Bergmann

Field Summary
protected  StorageSystem system
           
 
Constructor Summary
protected StorageSystemConsumer(StorageSystem system)
           
 
Method Summary
 void close()
          When called, the implementor has to close and free all resources.
 void flush()
          Is called by Benerator for advising the Consumer to finish processing of the objects consumed so far.
 boolean isParallelizable()
           
 boolean isThreadSafe()
           
 java.lang.String toString()
           
 
Methods inherited from class org.databene.benerator.consumer.AbstractConsumer
finishConsuming, finishProductConsumption, startConsuming, startProductConsumption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

system

protected final StorageSystem system
Constructor Detail

StorageSystemConsumer

protected StorageSystemConsumer(StorageSystem system)
Method Detail

isThreadSafe

public boolean isThreadSafe()
Specified by:
isThreadSafe in interface org.databene.commons.ThreadAware

isParallelizable

public boolean isParallelizable()
Specified by:
isParallelizable in interface org.databene.commons.ThreadAware

flush

public void flush()
Description copied from interface: Consumer
Is called by Benerator for advising the Consumer to finish processing of the objects consumed so far. In Benerator descriptor files, the flushing behavior is controlled by the pageSize attribute.

Specified by:
flush in interface java.io.Flushable
Specified by:
flush in interface Consumer
Overrides:
flush in class AbstractConsumer

close

public void close()
Description copied from interface: Consumer
When called, the implementor has to close and free all resources. It will not receive any more calls.

Specified by:
close in interface java.io.Closeable
Specified by:
close in interface Consumer
Overrides:
close in class AbstractConsumer

toString

public java.lang.String toString()
Overrides:
toString in class AbstractConsumer


Copyright © 2013. All Rights Reserved.