public void close ( ) throws ZkInterruptedException { if ( _connection == null ) { return ; } LOG . debug ( "Closing ZkClient..." ) ; getEventLock ( ) . lock ( ) ; try { setShutdownTrigger ( true ) ; _eventThread . interrupt ( ) ; _eventThread . join ( 2000 ) ; _connection . close ( ) ; _connection = null ; } catch ( InterruptedException e ) { throw new ZkInterruptedException ( e ) ; } finally { getEventLock ( ) . unlock ( ) ; } LOG . debug ( "Closing ZkClient...done" ) ; }
Close the client .