public final void start(long state_timeout) throws ChannelClosedException, ChannelNotConnectedException { boolean rc; logger.debug("DistributedQueue.initState(" + groupname + "): starting state retrieval"); rc = channel.getState(null, state_timeout); if (rc) { logger.info("DistributedQueue.initState(" + groupname + "): state was retrieved successfully"); } else { logger.info("DistributedQueue.initState(" + groupname + "): state could not be retrieved (first member)"); } }
public DistributedTree(PullPushAdapter adapter, Serializable id, long state_timeout) throws ChannelException { channel = (Channel)adapter.getTransport(); disp=new RpcDispatcher(adapter, id, this, this, this); boolean flag = channel.getState(null, state_timeout); if(flag) { if(log.isInfoEnabled()) log.info("state was retrieved successfully"); } else if(log.isInfoEnabled()) log.info("state could not be retrieved (must be first member in group)"); }
public void start(long timeout) throws Exception { if(channel != null) // already started return; channel=new JChannel(channel_properties); disp=new RpcDispatcher(channel, this, this, this); channel.connect(groupname); rc=channel.getState(null, timeout); if(rc) { if(log.isInfoEnabled()) log.info("state was retrieved successfully"); } else if(log.isInfoEnabled()) log.info("state could not be retrieved (must be first member in group)"); }
public void actionPerformed(ActionEvent e) { try { boolean rc=channel.getState(null, 3000); if(rc == false) error("State could not be retrieved !"); } catch(Throwable t) { error("exception fetching state: " + t); } } });
public void start() { try { channel=new JChannel(props); disp=new RpcDispatcher(channel, this, this, this); channel.connect(channel_name); System.out.println("\nQuote Server started at " + new Date()); System.out.println("Joined channel '" + channel_name + "' (" + channel.getView().size() + " members)"); channel.getState(null, 0); System.out.println("Ready to serve requests"); } catch(Exception e) { log.error("QuoteServer.start() : " + e); System.exit(-1); } }
public void start(final long timeout) throws Exception { if(channel != null) { return; } channel = new JChannel(channel_properties); // Set the auto-reconnect option for enabling a node to leave and re-join the cluster channel.setOpt(Channel.AUTO_RECONNECT, true); disp = new RpcDispatcher(channel, this, this, this); channel.connect(groupname); rc = channel.getState(null, timeout); if(rc) { if(log.isInfoEnabled()) { log.info("state was retrieved successfully"); } } else if(log.isInfoEnabled()) { log.info("state could not be retrieved (must be first member in group)"); } }
private void getInitState(Channel channel, long state_timeout) throws ChannelClosedException, ChannelNotConnectedException { try { notifyStateTransferStarted(); boolean rc=channel.getState(null, state_timeout); if(rc) { if(log.isInfoEnabled()) log.info("state was retrieved successfully"); } else { if(log.isInfoEnabled()) log.info("state could not be retrieved (first member)"); notifyStateTransferCompleted(false); } } catch(ChannelClosedException ex) { notifyStateTransferCompleted(false); throw ex; } catch(ChannelNotConnectedException ex2) { notifyStateTransferCompleted(false); throw ex2; } }
rc=channel.getState(null, state_timeout); if(rc) { if(log.isInfoEnabled()) log.info("state was retrieved successfully, waiting for setState()");
rc=channel.getState(null, state_timeout); if(rc) { if(log.isInfoEnabled()) log.info("state was retrieved successfully, waiting for setState()");
channel.getState(null, state_timeout);
start = System.currentTimeMillis(); String state_id = CoreGroupCommunicationService.this.stateIdPrefix + serviceName; rc = CoreGroupCommunicationService.this.getChannel().getState(null, state_id, CoreGroupCommunicationService.this.getStateTransferTimeout()); if (rc)
start = System.currentTimeMillis(); try { CoreGroupCommunicationService.this.channel.getState(null, CoreGroupCommunicationService.this.getStateTransferTimeout()); synchronized (this) { while (!this.isStateSet) {
channel.connect(group_name); ad=new PullPushAdapter(channel, this, this); channel.getState(null, 5000);
channel.connect(groupname); System.out.println("INIT()"); channel.getState(null, 0); } catch (Exception e) { log.error("Whiteboard.init(): " + e);
channel=new JChannel(props); channel.connect("TotalOrderGroup"); channel.getState(null, 8000);