Switching from thread pool to SingleThread

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-publishing/document-store-lib@128099 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2016-04-14 15:42:02 +00:00
parent e5ed2f4be5
commit 5da3783125
2 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ class PersistenceBackendMonitor implements Runnable {
public PersistenceBackendMonitor(PersistenceBackend persistenceBackend){
this.persistenceBackend = persistenceBackend;
this.scheduler = Executors.newScheduledThreadPool(1);
this.scheduler = Executors.newSingleThreadScheduledExecutor();
this.scheduler.scheduleAtFixedRate(this, INITIAL_DELAY, DELAY, TimeUnit.MINUTES);
}

View File

@ -28,7 +28,7 @@ class PersistenceBackendRediscover implements Runnable {
long initialDelay, long delay, TimeUnit timeUnit){
this.context = context;
this.fallbackPersistenceBackend = fallbackPersistenceBackend;
this.scheduler = Executors.newScheduledThreadPool(1);
this.scheduler = Executors.newSingleThreadScheduledExecutor();
this.scheduler.scheduleAtFixedRate(this, initialDelay, delay, timeUnit);
}