protected void startCacheInvalidator ( ) { polling = true ; Thread thread = new Thread ( new Runnable ( ) { @ Override public void run ( ) { // Wait for 30s on startup before starting to poll. try { Thread . sleep ( startupDelayMillis ) ; } catch ( InterruptedException e1 ) { e1 . printStackTrace ( ) ; } while ( polling ) { try { Thread . sleep ( pollIntervalMillis ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } checkCacheVersion ( ) ; } } } , "ESRegistryCacheInvalidator" ) ; //$NON-NLS-1$ thread . setDaemon ( true ) ; thread . start ( ) ; }
Starts up a thread that polls the ES store for updates .