public class SpeciesLifecycle
extends org.gcube.data.tmf.impl.LifecycleAdapter
| Modifier and Type | Field and Description |
|---|---|
protected List<String> |
datasources |
protected static org.gcube.data.speciesplugin.requests.RequestBinder |
db |
protected long |
lastUpdate |
protected ScheduledFuture<?> |
scheduled |
protected List<String> |
scientificNames |
static String |
STORAGE_LOCATION
The storage location.
|
protected boolean |
strictMatch |
protected TimeUnit |
timeUnit |
protected long |
updatePeriod |
| Constructor and Description |
|---|
SpeciesLifecycle(SpeciesSource source,
List<String> scientificNames,
List<String> datasources,
boolean strictMatch,
long updatePeriod,
TimeUnit timeUnit)
Creates an instance for a given
SpeciesSource |
| Modifier and Type | Method and Description |
|---|---|
protected long |
calculateInitialRefreshDelay() |
void |
init() |
protected void |
loadCollection() |
void |
reconfigure(Element DOMRequest) |
protected void |
refreshCollection() |
protected void |
rescheduleRefresh() |
protected void |
scheduleRefresh() |
void |
stop() |
void |
terminate() |
protected void |
unscheduleRefresh() |
public static final String STORAGE_LOCATION
protected static org.gcube.data.speciesplugin.requests.RequestBinder db
protected boolean strictMatch
protected long lastUpdate
protected transient ScheduledFuture<?> scheduled
protected long updatePeriod
protected TimeUnit timeUnit
public SpeciesLifecycle(SpeciesSource source, List<String> scientificNames, List<String> datasources, boolean strictMatch, long updatePeriod, TimeUnit timeUnit)
SpeciesSourcesource - the sourcepublic void init()
throws Exception
init in interface org.gcube.data.tmf.api.SourceLifecycleinit in class org.gcube.data.tmf.impl.LifecycleAdapterExceptionprotected void scheduleRefresh()
protected long calculateInitialRefreshDelay()
protected void rescheduleRefresh()
protected void refreshCollection()
public void reconfigure(Element DOMRequest) throws org.gcube.common.clients.exceptions.InvalidRequestException
reconfigure in interface org.gcube.data.tmf.api.SourceLifecyclereconfigure in class org.gcube.data.tmf.impl.LifecycleAdapterorg.gcube.common.clients.exceptions.InvalidRequestExceptionpublic void terminate()
terminate in interface org.gcube.data.tmf.api.SourceLifecycleterminate in class org.gcube.data.tmf.impl.LifecycleAdapterpublic void stop()
stop in interface org.gcube.data.tmf.api.SourceLifecyclestop in class org.gcube.data.tmf.impl.LifecycleAdapterprotected void unscheduleRefresh()
Copyright © 2016. All Rights Reserved.