public class ETLManager extends AbstractRestObject<ETLManager,ETLManagerJson> implements ICachedObject
moduleName| Constructor and Description |
|---|
ETLManager(String moduleName,
File cacheFolder)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abortHarvest()
Attempts to abort an ongoing harvest.
|
void |
addEventListeners()
Adds event listeners.
|
long |
estimateRemainingHarvestTime()
Estimates the remaining harvesting duration in milliseconds.
|
ETLManagerJson |
getAsJson(javax.ws.rs.core.MultivaluedMap<String,String> query)
Returns a JSON representation of this object.
|
ETLJson |
getETLAsJson(javax.ws.rs.core.MultivaluedMap<String,String> query)
Returns a specified ETL as JSON object.
|
ETLInfosJson |
getETLsAsJson()
Returns an info JSON object with detailed information about all
ETLs.
|
int |
getHarvestedCount()
Retrieves the number of documents that have been loaded.
|
ETLHealth |
getHealth()
Retrieves an overall health status.
|
int |
getMaxNumberOfDocuments()
Sums up the expected number of harvestable documents of all registered ETLs.
|
protected String |
getPrettyPlainText()
Returns a pretty print representation of this object.
|
ETLState |
getState()
Returns a status representing the entirety of all registered ETL statuses.
|
void |
harvest()
Attempts to start a harvest, signaling all registered ETLs to start
|
boolean |
hasOutdatedETLs()
Updates all registered ETLs and checks if they are outdated.
|
void |
loadFromDisk()
Attempts to load and set values from a cached file.
|
void |
register(AbstractETL<?,?> addedEtl)
Registers an AbstractETL, adding it to the list of ETLs
that can be controlled via REST.
|
void |
removeEventListeners()
Removes all event listeners of this class.
|
void |
saveToDisk()
Saves the object to a cache file on disk, which can be loaded
via loadFromDisk().
|
getAsPlainText, onContextDestroyedpublic void loadFromDisk()
ICachedObjectloadFromDisk in interface ICachedObjectpublic void saveToDisk()
ICachedObjectsaveToDisk in interface ICachedObjectprotected String getPrettyPlainText()
AbstractRestObjectgetPrettyPlainText in class AbstractRestObject<ETLManager,ETLManagerJson>public ETLManagerJson getAsJson(javax.ws.rs.core.MultivaluedMap<String,String> query)
AbstractRestObjectgetAsJson in class AbstractRestObject<ETLManager,ETLManagerJson>query - optional query parameters from the HTTP requestpublic ETLInfosJson getETLsAsJson()
public ETLJson getETLAsJson(javax.ws.rs.core.MultivaluedMap<String,String> query) throws IllegalArgumentException
query - query parameters that should contain 'name'IllegalArgumentException - if no name was specified or the
ETL with that name could not be foundpublic void register(AbstractETL<?,?> addedEtl)
addedEtl - the AbstractETL to be registeredpublic boolean hasOutdatedETLs()
public void addEventListeners()
IEventListeneraddEventListeners in interface IEventListeneraddEventListeners in class AbstractRestObject<ETLManager,ETLManagerJson>public void removeEventListeners()
IEventListenerremoveEventListeners in interface IEventListenerremoveEventListeners in class AbstractRestObject<ETLManager,ETLManagerJson>public void harvest()
throws IllegalStateException
IllegalStateException - thrown if another ongoing harvest is blocking this processpublic int getMaxNumberOfDocuments()
public void abortHarvest()
IllegalStateException - if no harvest is in progresspublic int getHarvestedCount()
public ETLHealth getHealth()
public ETLState getState()
public long estimateRemainingHarvestTime()
Copyright © 2017–2019. All rights reserved.