org.apache.openjpa.writebehind
Class SimpleWriteBehindCallback
java.lang.Object
org.apache.openjpa.writebehind.AbstractWriteBehindCallback
org.apache.openjpa.writebehind.SimpleWriteBehindCallback
- All Implemented Interfaces:
- Runnable, WriteBehindCallback
public class SimpleWriteBehindCallback
- extends AbstractWriteBehindCallback
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleWriteBehindCallback
public SimpleWriteBehindCallback()
initialize
public void initialize(Broker broker,
WriteBehindCache cache)
- Description copied from interface:
WriteBehindCallback
- Initialize the WriteBehindCallback. The callback will pull changes from
the provided WriteBehindCache flush them using the provided broker. The
WriteBehindCallback is responsible for closing the Broker.
- Parameters:
broker
- A new broker instance that the writebehind callback will use
to flush changes to the database.cache
- A WriteBehindCache
which contains the inflight
changes.
flush
public Collection<Exception> flush()
- Description copied from interface:
WriteBehindCallback
- Manually flush changes to the database.
- Returns:
- A Collection of Exceptions which occurred during the flush.
run
public void run()
handleExceptions
public void handleExceptions(Collection<Exception> exceptions)
close
public void close()
- Description copied from interface:
WriteBehindCallback
- Close the WriteBehindCallback releasing resources to the JVM
getSleepTime
public int getSleepTime()
setSleepTime
public void setSleepTime(int sleepTime)
Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.