Class AbstractIncrementalBackupJob
- java.lang.Object
-
- org.exoplatform.services.jcr.ext.backup.impl.AbstractBackupJob
-
- org.exoplatform.services.jcr.ext.backup.impl.AbstractIncrementalBackupJob
-
- All Implemented Interfaces:
Runnable,org.exoplatform.services.jcr.dataflow.persistent.ItemsPersistenceListener,BackupJob
- Direct Known Subclasses:
IncrementalBackupJob
public abstract class AbstractIncrementalBackupJob extends AbstractBackupJob implements org.exoplatform.services.jcr.dataflow.persistent.ItemsPersistenceListener
Created by The eXo Platform SARL .- Version:
- $Id: $
- Author:
- Gennady Azarenkov
-
-
Field Summary
Fields Modifier and Type Field Description protected CountDownLatchlatcherAllows to make all threads waiting.protected List<org.exoplatform.services.jcr.dataflow.ItemStateChangesLog>suspendBufferShould be synchronized collection.protected AtomicIntegerworkingThreadsThe amount of current working threads.-
Fields inherited from class org.exoplatform.services.jcr.ext.backup.impl.AbstractBackupJob
config, id, repository, state, timeStamp, url, workspaceName
-
-
Constructor Summary
Constructors Constructor Description AbstractIncrementalBackupJob()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intgetType()Getting the type of job.voidonSaveItems(org.exoplatform.services.jcr.dataflow.ItemStateChangesLog chlog)URLresume()voidrun()protected abstract voidsave(org.exoplatform.services.jcr.dataflow.ItemStateChangesLog log)Implementation specific savingvoidsuspend()-
Methods inherited from class org.exoplatform.services.jcr.ext.backup.impl.AbstractBackupJob
addListener, createStorage, getId, getState, getStorageURL, notifyError, notifyListeners, removeListener
-
-
-
-
Field Detail
-
suspendBuffer
protected final List<org.exoplatform.services.jcr.dataflow.ItemStateChangesLog> suspendBuffer
Should be synchronized collection.
-
workingThreads
protected AtomicInteger workingThreads
The amount of current working threads.
-
latcher
protected CountDownLatch latcher
Allows to make all threads waiting.
-
-
Method Detail
-
getType
public final int getType()
Description copied from interface:BackupJobGetting the type of job.
-
onSaveItems
public void onSaveItems(org.exoplatform.services.jcr.dataflow.ItemStateChangesLog chlog)
- Specified by:
onSaveItemsin interfaceorg.exoplatform.services.jcr.dataflow.persistent.ItemsPersistenceListener
-
run
public final void run()
- Specified by:
runin interfaceRunnable- See Also:
Runnable.run()
-
suspend
public final void suspend()
-
resume
public final URL resume()
-
save
protected abstract void save(org.exoplatform.services.jcr.dataflow.ItemStateChangesLog log) throws IOExceptionImplementation specific saving- Parameters:
log-- Throws:
IOException
-
-