public static void main ( String [ ] args ) throws Exception { // Parse the command line arguments. final List < String > unknown = new ArrayList <> ( ) ; final Namespace namespace = parseArgs ( args , unknown ) ; final Namespace extraArgs = parseUnknown ( unknown ) ; extraArgs . getAttrs ( ) . forEach ( ( key , value ) -> System . setProperty ( key , value . toString ( ) ) ) ; final Logger logger = createLogger ( namespace ) ; final Atomix atomix = buildAtomix ( namespace ) ; atomix . start ( ) . join ( ) ; logger . info ( "Atomix listening at {}" , atomix . getMembershipService ( ) . getLocalMember ( ) . address ( ) ) ; final ManagedRestService rest = buildRestService ( atomix , namespace ) ; rest . start ( ) . join ( ) ; logger . warn ( "The Atomix HTTP API is BETA and is intended for development and debugging purposes only!" ) ; logger . info ( "HTTP server listening at {}" , rest . address ( ) ) ; synchronized ( Atomix . class ) { while ( atomix . isRunning ( ) ) { Atomix . class . wait ( ) ; } } }
Runs a standalone Atomix agent from the given command line arguments .