public void init() throws Exception { super.init(); TP tmp=getTransport(); if(!(tmp instanceof SHARED_LOOPBACK)) throw new IllegalStateException("the transport must be " + SHARED_LOOPBACK.class.getSimpleName()); }
public void init() throws Exception { super.init(); dynamic_hosts=new BoundedList<>(max_dynamic_hosts); }
public void init() throws Exception { super.init(); // sanity check: we cannot have any discovery protocols _above_ us for(Protocol p=up_prot; p != null; p=p.getUpProtocol()) if(p instanceof Discovery) throw new IllegalStateException(String.format("found %s above %s: this is invalid; all discovery " + "protocols must be placed below %s", p.getClass().getSimpleName(), getClass().getSimpleName(), getClass().getSimpleName())); // add all discovery protocols below us to the discovery_protocols list for(Protocol p=down_prot; p != null; p=p.getDownProtocol()) if(p instanceof Discovery) discovery_protocols.add((Discovery)p); }
public void init() throws Exception { super.init(); createRootDir(); if(register_shutdown_hook) { Runtime.getRuntime().addShutdownHook(new Thread(() -> remove(cluster_name, local_addr))); } }
public void init() throws Exception { super.init(); stubManager = RouterStubManager.emptyGossipClientStubManager(this).useNio(this.use_nio); // we cannot use TCPGOSSIP together with TUNNEL (https://jira.jboss.org/jira/browse/JGRP-1101) TP transport=getTransport(); if(transport instanceof TUNNEL) throw new IllegalStateException("TCPGOSSIP cannot be used with TUNNEL; use either TUNNEL:PING or " + "TCP:TCPGOSSIP as valid configurations"); }
@Override public void init() throws Exception { super.init(); validateProperties(); transportPort = getTransport().getBindPort(); portRange = getTransport().getPortRange(); if (dns_resolver == null) { if (dns_address == null || dns_address.isEmpty()) { dns_resolver = new DefaultDNSResolver(dns_context_factory, dns_address); } else { dns_resolver = new AddressedDNSResolver(dns_context_factory, dns_address); } } }
public void init() throws Exception { super.init(); TP tmp=getTransport(); if(!(tmp instanceof SHARED_LOOPBACK)) throw new IllegalStateException("the transport must be " + SHARED_LOOPBACK.class.getSimpleName()); }
public void init() throws Exception { super.init(); dynamic_hosts=new BoundedList<>(max_dynamic_hosts); }
public void init() throws Exception { super.init(); createRootDir(); if(register_shutdown_hook) { Runtime.getRuntime().addShutdownHook(new Thread(() -> remove(cluster_name, local_addr))); } }
public void init() throws Exception { super.init(); // sanity check: we cannot have any discovery protocols _above_ us for(Protocol p=up_prot; p != null; p=p.getUpProtocol()) if(p instanceof Discovery) throw new IllegalStateException(String.format("found %s above %s: this is invalid; all discovery " + "protocols must be placed below %s", p.getClass().getSimpleName(), getClass().getSimpleName(), getClass().getSimpleName())); // add all discovery protocols below us to the discovery_protocols list for(Protocol p=down_prot; p != null; p=p.getDownProtocol()) if(p instanceof Discovery) discovery_protocols.add((Discovery)p); }
public void init() throws Exception { super.init(); stubManager = RouterStubManager.emptyGossipClientStubManager(this).useNio(this.use_nio); // we cannot use TCPGOSSIP together with TUNNEL (https://jira.jboss.org/jira/browse/JGRP-1101) TP transport=getTransport(); if(transport instanceof TUNNEL) throw new IllegalStateException("TCPGOSSIP cannot be used with TUNNEL; use either TUNNEL:PING or " + "TCP:TCPGOSSIP as valid configurations"); }
public void init() throws Exception { super.init();
public void init() throws Exception { super.init();
@Override public void init() throws Exception { super.init(); validateProperties(); transportPort = getTransport().getBindPort(); if (transportPort <= 0) { log.warn("Unable to discover transport port. This may prevent members from being discovered."); } if (dns_resolver == null) { if (dns_address == null || dns_address.length() == 0) { dns_resolver = new DefaultDNSResolver(dns_context_factory, dns_address); } else { dns_resolver = new AddressedDNSResolver(dns_context_factory, dns_address); } } }
@Override public void init() throws Exception { super.init(); if (!Strings.isNullOrBlank(address)) { client = new DefaultKubernetesClient(new ConfigBuilder().withMasterUrl(address).build()); } else { client = new DefaultKubernetesClient(); } }
/** * Scans the environment for information about the AWS node that we are * currently running on and parses the filters and tags. */ public void init() throws Exception { super.init(); //get the instance identity try (CloseableHttpClient client = HttpClients.createDefault()) { this.instanceIdentity = InstanceIdentity.getIdentity(client); } //setup ec2 client this.ec2 = EC2Factory.create( instanceIdentity, access_key, secret_key, credentials_provider_class, new CredentialsProviderFactory(), log_aws_error_messages); this.ipAddressUtils = new IPAddressUtils(port_number, port_range); this.tagUtils = new TagsUtils(ec2, instanceIdentity, tags).validateTags(); this.filterUtils = new FilterUtils(filters, tagUtils); log.info("Configured for instance: " + instanceIdentity.instanceId); filterUtils.getAwsFilters().ifPresent(f -> log.info("Configured with filters [%s]", f)); tagUtils.getAwsTagNames().ifPresent(t -> log.info("Configured with tags [%s]", t)); }