コード例 #1
0
  public GlobalConfigurationBuilder read(GlobalConfiguration template) {
    this.cl = template.classLoader();

    asyncListenerExecutor.read(template.asyncListenerExecutor());
    asyncTransportExecutor.read(template.asyncTransportExecutor());
    evictionScheduledExecutor.read(template.evictionScheduledExecutor());
    globalJmxStatistics.read(template.globalJmxStatistics());
    replicationQueueScheduledExecutor.read(template.replicationQueueScheduledExecutor());
    serialization.read(template.serialization());
    shutdown.read(template.shutdown());
    transport.read(template.transport());

    return this;
  }
コード例 #2
0
  public GlobalConfigurationBuilder read(GlobalConfiguration template) {
    this.cl = new WeakReference<ClassLoader>(template.classLoader());

    for (Object c : template.modules().values()) {
      BuiltBy builtBy = c.getClass().getAnnotation(BuiltBy.class);
      Builder<Object> builder = (Builder<Object>) this.addModule(builtBy.value());
      builder.read(c);
    }

    asyncListenerExecutor.read(template.asyncListenerExecutor());
    asyncTransportExecutor.read(template.asyncTransportExecutor());
    remoteCommandsExecutor.read(template.remoteCommandsExecutor());
    evictionScheduledExecutor.read(template.evictionScheduledExecutor());
    globalJmxStatistics.read(template.globalJmxStatistics());
    replicationQueueScheduledExecutor.read(template.replicationQueueScheduledExecutor());
    serialization.read(template.serialization());
    shutdown.read(template.shutdown());
    transport.read(template.transport());
    site.read(template.sites());
    totalOrderExecutor.read(template.totalOrderExecutor());
    return this;
  }