Package com.shop.cache.api.server

Examples of com.shop.cache.api.server.SCServer


     * CCDB2 package to do this
     */
    SCStorage         db = CCDB2StorageFactory.create(new CCDB2Parameters());
    db.open(getFileFromPath(arguments.dbPath));

    /**
     * Everything's set up, we can now create the server
     */
    final SCServer       server = factory.newServer(context, db);

    /**
     * Set up a hook to handle CTRL-C shutdown requests
     */
    Thread           hook = new Thread
    (
      new Runnable()
      {
        @Override
        public void run()
        {
          System.out.println("Shutting down...");
          server.shutdown();
        }
      }
    );
    hook.setDaemon(true);
    Runtime.getRuntime().addShutdownHook(hook);

    /**
     * sleep until the server process is done
     */
    server.join();
    System.out.println("Done.");
  }
 
View Full Code Here

TOP

Related Classes of com.shop.cache.api.server.SCServer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.