Package org.springframework.integration.samples.voldemort.service

Examples of org.springframework.integration.samples.voldemort.service.BusinessService


    context.registerShutdownHook();

    final Scanner scanner = new Scanner(System.in);

    final BusinessService service = context.getBean(BusinessService.class);

    if (LOGGER.isInfoEnabled()) {
      LOGGER.info("\n========================================================="
            + "\n                                                         "
            + "\n    Please press 'q + Enter' to quit the application.    "
            + "\n                                                         "
            + "\n=========================================================" );
    }

    System.out.print("Please enter a string and press <enter>: ");

    final String key = "hello";

    while (true) {

      final String data = scanner.nextLine();

      if("q".equals(data.trim())) {
        break;
      }

      try {

        System.out.println(String.format("Persisting String: '%s' with key '%s'.", data, key));
        service.saveData(key, data);

      } catch (Exception e) {
        LOGGER.error("An exception was caught: " + e);
      }
View Full Code Here

TOP

Related Classes of org.springframework.integration.samples.voldemort.service.BusinessService

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.