public class DataSyncTask extends Object implements org.exist.storage.SystemTask
REMOVE_FROM_COLLECTION_PARAM.
After syncing cache is cleared to prevent problems, this can be turned off via CLEAR_CACHE_PARAM.
Meant to be used as a start-up task, DataSyncTaskCron is meant to be scheduled as a cronjob.| Modifier and Type | Field and Description |
|---|---|
static String |
CLEAR_CACHE_PARAM |
static String |
CLEAR_CACHE_XQ
should be placed in the root of your jar
|
static String |
COLLECTION_PARAM |
static String |
DATA_DIR
default data dir on filesystem (i.e.
|
static String |
DATADIR_PARAM |
static String |
REMOVE_FROM_COLLECTION_PARAM |
| Constructor and Description |
|---|
DataSyncTask() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
afterCheckpoint() |
void |
configure(org.exist.util.Configuration config,
Properties properties) |
void |
execute(org.exist.storage.DBBroker broker,
org.exist.storage.txn.Txn transaction) |
String |
getName() |
protected void |
storeInCollection(Path fileToStore,
org.exist.xmldb.XmldbURI documentInCollection,
org.exist.collections.Collection collection,
org.exist.storage.txn.Txn transaction,
org.exist.storage.DBBroker broker)
This method uses either
Collection.store(Txn, DBBroker, IndexInfo, InputSource)
after validation to store the document, or Collection.addBinaryResource(Txn, DBBroker, XmldbURI, InputStream, String, long)
for file types other than xml. |
public static final String DATA_DIR
public static final String COLLECTION_PARAM
public static final String DATADIR_PARAM
public static final String REMOVE_FROM_COLLECTION_PARAM
public static final String CLEAR_CACHE_XQ
public static final String CLEAR_CACHE_PARAM
public String getName()
getName in interface org.exist.storage.SystemTaskpublic void configure(org.exist.util.Configuration config,
Properties properties)
throws org.exist.EXistException
configure in interface org.exist.storage.SystemTaskorg.exist.EXistExceptionpublic void execute(org.exist.storage.DBBroker broker,
org.exist.storage.txn.Txn transaction)
throws org.exist.EXistException
execute in interface org.exist.storage.SystemTaskorg.exist.EXistExceptionprotected void storeInCollection(Path fileToStore, org.exist.xmldb.XmldbURI documentInCollection, org.exist.collections.Collection collection, org.exist.storage.txn.Txn transaction, org.exist.storage.DBBroker broker) throws org.exist.EXistException, org.exist.security.PermissionDeniedException, SAXException, org.exist.util.LockException, IOException
Collection.store(Txn, DBBroker, IndexInfo, InputSource)
after validation to store the document, or Collection.addBinaryResource(Txn, DBBroker, XmldbURI, InputStream, String, long)
for file types other than xml.fileToStore - documentInCollection - collection - transaction - broker - org.exist.EXistExceptionorg.exist.security.PermissionDeniedExceptionSAXExceptionorg.exist.util.LockExceptionIOExceptionpublic boolean afterCheckpoint()
afterCheckpoint in interface org.exist.storage.SystemTaskCopyright © 2020 Fryske Akademy. All rights reserved.