private void backgroundOperationsLoop() { try { while ( state.get() == CuratorFrameworkState.STARTED ) { OperationAndData<?> operationAndData; try { operationAndData = backgroundOperations.take(); if ( debugListener != null ) { debugListener.listen(operationAndData); } performBackgroundOperation(operationAndData); } catch ( InterruptedException e ) { // swallow the interrupt as it's only possible from either a background // operation and, thus, doesn't apply to this loop or the instance // is being closed in which case the while test will get it } } } finally { log.info("backgroundOperationsLoop exiting"); } }
private void backgroundOperationsLoop() { try { while ( state.get() == CuratorFrameworkState.STARTED ) { OperationAndData<?> operationAndData; try { operationAndData = backgroundOperations.take(); if ( debugListener != null ) { debugListener.listen(operationAndData); } performBackgroundOperation(operationAndData); } catch ( InterruptedException e ) { // swallow the interrupt as it's only possible from either a background // operation and, thus, doesn't apply to this loop or the instance // is being closed in which case the while test will get it } } } finally { log.info("backgroundOperationsLoop exiting"); } }
private void backgroundOperationsLoop() { try { while ( state.get() == CuratorFrameworkState.STARTED ) { OperationAndData<?> operationAndData; try { operationAndData = backgroundOperations.take(); if ( debugListener != null ) { debugListener.listen(operationAndData); } performBackgroundOperation(operationAndData); } catch ( InterruptedException e ) { // swallow the interrupt as it's only possible from either a background // operation and, thus, doesn't apply to this loop or the instance // is being closed in which case the while test will get it } } } finally { log.info("backgroundOperationsLoop exiting"); } }