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:
parent
e5ed2f4be5
commit
5da3783125
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue