public static synchronized void start ( ) { if ( status . equals ( "started" ) ) return ; init ( ) ; long t = System . currentTimeMillis ( ) ; Transactions . clear ( ) ; queueWorker . clear ( ) ; operationLog . initialize ( ) ; messageListener . start ( ) ; //find not operationLog . listUndone ( new Closure < MessageBean , Object > ( ) { @ Override public Object call ( MessageBean input ) { try { queueWorker . runRealWrite ( input ) ; operationLog . markDone ( input . getId ( ) ) ; } catch ( Throwable e ) { queueWorker . onError ( input , e ) ; } return null ; } } ) ; //update startupUpdator . update ( queueWorker ) ; queueWorker . start ( ) ; startupUpdator . start ( ) ; try { fileExchange . start ( ) ; } catch ( BindException e ) { LOG . error ( "Cannot start file exchange capability, BindException occurs: " + e . getMessage ( ) ) ; System . exit ( 1 ) ; } status = "started" ; LOG . info ( "Cluster node " + nodeId + " started (" + ( System . currentTimeMillis ( ) - t ) + " ms.)" ) ; }
Synchronously start current node