public void close ( ) { this . waitUntilInitialized ( ) ; this . ongoingOperationsGroup . blockAndWait ( ) ; syncLock . lock ( ) ; try { if ( this . networkMonitor != null ) { this . networkMonitor . removeNetworkStateListener ( this ) ; } this . dispatcher . close ( ) ; stop ( ) ; this . localClient . close ( ) ; } finally { syncLock . unlock ( ) ; } }
Stops the background data synchronization thread and releases the local client .