public void init() throws Exception { super.init(); TP transport=getTransport(); if(transport instanceof BasicTCP) log.info(this.getClass().getSimpleName() + " is not needed (and can be removed) as we're running on a TCP transport"); }
public void init() { super.init(); fd=(FD)sv.getProtocolStack().findProtocol(FD.class); if(fd == null) { log.info("FD was not found, uninstalling myself (" + getClass().getSimpleName() + ")"); sv.uninstallRule(getClass().getSimpleName()); } }
protected void start() throws Exception { channel.connect(cluster_name); log.info("%s: joined bridge cluster '%s'", channel.getAddress(), cluster_name); }
protected void stop() { log.info("%s: leaving bridge cluster '%s'", channel.getAddress(), channel.getClusterName()); Util.close(channel); }
@ManagedOperation(description="Inject a view (example of view string format: A=A/B/C;B=B/C;C=C)") public synchronized void injectView(String newView) { try { log.info("Received request to inject view %s", newView); String[] perNode = newView.split(NODE_VIEWS_SEPARATOR); String thisNodeAddress = getProtocolStack().getChannel().getAddressAsString(); log.info("[channel: %s] Injecting a new view: %s", thisNodeAddress, nodeView); log.info("[channel: %s] Injection finished of view: %s", thisNodeAddress, nodeView);
public void init() throws Exception { super.init(); TP transport=getTransport(); sends_can_block=transport instanceof TCP; // UDP and TCP_NIO2 won't block time_service=transport.getTimeService(); if(time_service == null) throw new IllegalStateException("time service from transport is null"); last_sync_sent=new ExpiryCache<>(sync_min_interval); // max bundle size (minus overhead) divided by <long size> times bits per long // Example: for 8000 missing messages, SeqnoList has a serialized size of 1012 bytes, for 64000 messages, the // serialized size is 8012 bytes. Therefore, for a serialized size of 64000 bytes, we can retransmit a max of // 8 * 64000 = 512'000 seqnos // see SeqnoListTest.testSerialization3() int estimated_max_msgs_in_xmit_req=(transport.getMaxBundleSize() -50) * Global.LONG_SIZE; int old_max_xmit_size=max_xmit_req_size; if(max_xmit_req_size <= 0) max_xmit_req_size=estimated_max_msgs_in_xmit_req; else max_xmit_req_size=Math.min(max_xmit_req_size, estimated_max_msgs_in_xmit_req); if(old_max_xmit_size != max_xmit_req_size) log.trace("%s: set max_xmit_req_size from %d to %d", local_addr, old_max_xmit_size, max_xmit_req_size); boolean regular_pool_enabled=(boolean)transport.getValue("thread_pool_enabled"); if(!regular_pool_enabled) log.info("the thread pool is disabled; %s could be removed (JGRP-2069)", getClass().getSimpleName()); }
public void connect() throws IOException{ for (String dest : server_destinations) { try { connectToSingleDestination(dest); log.info("Connected to " + dest); break; } catch(IOException ex) { if(log.isErrorEnabled()) log.error(Util.getMessage("FailedConnectingTo") + dest + ":" + ex); } } if(!isConnected()) throw new IOException("no target server available"); startRunner(); }
try { if (!isConnected() && reconnect) { log.info("Reconnecting in "+timeout+"s."); try { Thread.sleep((long)timeout * 1000);
long diff=System.currentTimeMillis() - start; if(responses.isEmpty()) { log.info("%s: no members discovered after %d ms: creating cluster as first member", gms.local_addr, diff); becomeSingletonMember(mbr); return;
public void validateConfiguration() throws IllegalArgumentException { // Validate that container name is configured and must be all lowercase if (container == null || !container.toLowerCase().equals(container) || container.contains("--") || container.startsWith("-") || container.length() < 3 || container.length() > 63) { throw new IllegalArgumentException("Container name must be configured and must meet Azure requirements (must be a valid DNS name)."); } // Account name and access key must be both configured for write access if (storage_account_name == null || storage_access_key == null) { throw new IllegalArgumentException("Account name and key must be configured."); } // Lets inform users here that https would be preferred if (!use_https) { log.info("Configuration is using HTTP, consider switching to HTTPS instead."); } }
public void validateConfiguration() throws IllegalArgumentException { // Validate that container name is configured and must be all lowercase if (container == null || !container.toLowerCase().equals(container) || container.contains("--") || container.startsWith("-") || container.length() < 3 || container.length() > 63) { throw new IllegalArgumentException("Container name must be configured and must meet Azure requirements (must be a valid DNS name)."); } // Account name and access key must be both configured for write access if (storage_account_name == null || storage_access_key == null) { throw new IllegalArgumentException("Account name and key must be configured."); } // Lets inform users here that https would be preferred if (!use_https) { log.info("Configuration is using HTTP, consider switching to HTTPS instead."); } }
public void init() throws Exception { super.init(); TP transport=getTransport(); if(transport instanceof BasicTCP) log.info(this.getClass().getSimpleName() + " is not needed (and can be removed) as we're running on a TCP transport"); }
public void init() { super.init(); fd=(FD)sv.getProtocolStack().findProtocol(FD.class); if(fd == null) { log.info("FD was not found, uninstalling myself (" + getClass().getSimpleName() + ")"); sv.uninstallRule(getClass().getSimpleName()); } }
protected void start() throws Exception { channel.connect(cluster_name); log.info("%s: joined bridge cluster '%s'", channel.getAddress(), cluster_name); }
@Override public void stop() { try { if (_server != null) { if (log.isInfoEnabled()) { log.info(String.format("Stopping server: %s", _serverName)); } boolean stopped = _server.stop(stack.getChannel()); if (log.isInfoEnabled()) { log.info(String.format("%s %s.", _serverName, stopped ? "stopped" : "not stopped (still in use)")); } } } finally { super.stop(); } }
@Override public void stop() { try { if (_server != null) { if (log.isInfoEnabled()) { log.info(String.format("Stopping server: %s", _serverName)); } boolean stopped = _server.stop(stack.getChannel()); if (log.isInfoEnabled()) { log.info(String.format("%s %s.", _serverName, stopped ? "stopped" : "not stopped (still in use)")); } } } finally { super.stop(); } }
protected void stop() { log.info("%s: leaving bridge cluster '%s'", channel.getAddress(), channel.getClusterName()); Util.close(channel); }
protected CuratorFramework createCurator() throws KeeperException { log.info(String.format("Creating curator [%s], mode: %s", connection, getCreateMode())); CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder() .ensembleProvider(new FixedEnsembleProvider(connection)) .connectionTimeoutMs(connectionTimeout) .sessionTimeoutMs(sessionTimeout) .retryPolicy(new RetryNTimes(maxRetry, retryInterval)); if (password != null && password.length() > 0) { builder = builder.authorization(getScheme(), getAuth()).aclProvider(aclProvider); } return builder.build(); }
@Override public void start() throws Exception { if (isClusteringEnabled()) { int serverPort = getServerPort(); if (_serverFactory != null) { _server = _serverFactory.getServer(serverPort); } else { _server = Servers.getServer(serverPort); } _serverName = _server.getClass().getSimpleName(); if (log.isInfoEnabled()) { log.info(String.format("Starting %s on port %s for channel address: %s", _serverName, serverPort, stack .getChannel().getAddress())); } boolean started = _server.start(stack.getChannel()); if (log.isInfoEnabled()) { log.info(String.format("%s %s.", _serverName, started ? "started" : "reused (pre-existing)")); } } super.start(); }
public void connect() throws IOException{ for (String dest : server_destinations) { try { connectToSingleDestination(dest); log.info("Connected to " + dest); break; } catch(IOException ex) { if(log.isErrorEnabled()) log.error(Util.getMessage("FailedConnectingTo") + dest + ":" + ex); } } if(!isConnected()) throw new IOException("no target server available"); startRunner(); }