org.apache.geode.distributed.ServerLauncher Java Examples

The following examples show how to use org.apache.geode.distributed.ServerLauncher. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GeodeEmbeddedPolicy.java    From calcite with Apache License 2.0 5 votes vote down vote up
static GeodeEmbeddedPolicy create() {
  final ServerLauncher launcher  = new ServerLauncher.Builder()
      .setMemberName("fake-geode")
      .set("log-file", "") // log to stdout
      .set("log-level", "severe") // minimal logging
      .set("bind-address", "127.0.0.1") // accept internal connections only
      .setServerPort(0) // bind to any available port
      .setPdxPersistent(false)
      .setPdxReadSerialized(true)
      .build();

  return new GeodeEmbeddedPolicy(launcher);
}
 
Example #2
Source File: GeodeExtension.java    From immutables with Apache License 2.0 5 votes vote down vote up
private GeodeResource() {
  this.launcher  = new ServerLauncher.Builder()
          .setMemberName("fake-geode")
          .set("log-file", "") // log to stdout
          .set("log-level", "severe") // minimal logging
          .set("bind-address", "127.0.0.1") // accept internal connections only
          .setServerPort(0) // bind to any available port
          .setPdxPersistent(false)
          .setPdxReadSerialized(true)
          .build();

  launcher.start();
}
 
Example #3
Source File: GeodeEmbeddedPolicy.java    From calcite with Apache License 2.0 4 votes vote down vote up
private GeodeEmbeddedPolicy(final ServerLauncher launcher) {
  Objects.requireNonNull(launcher, "launcher");
  Preconditions.checkState(!launcher.isRunning(), "Launcher process is already running");
  this.launcher = launcher;
}