public static boolean oracleExists ( CuratorFramework curator ) { boolean exists = false ; try { exists = curator . checkExists ( ) . forPath ( ZookeeperPath . ORACLE_SERVER ) != null && ! curator . getChildren ( ) . forPath ( ZookeeperPath . ORACLE_SERVER ) . isEmpty ( ) ; } catch ( Exception nne ) { if ( nne instanceof KeeperException . NoNodeException ) { // you'll do nothing } else { throw new RuntimeException ( nne ) ; } } return exists ; }
Checks to see if an Oracle Server exists .