/** * Returns the name of the cluster which has been configured for this service. * * @return a {@code String} the name of the cluster; never {@code null} */ public String clusterName() { return channel.getClusterName(); }
public String getClusterName() { return channel.getClusterName(); }
@Override public String getGroupName() { return (this.channel != null) ? this.channel.getClusterName() : null; }
/** * Returns the name of the cluster which has been configured for this service. * * @return a {@code String} the name of the cluster; never {@code null} */ public String clusterName() { return channel.getClusterName(); }
protected ForkedClusteringService( Channel mainChannel ) { super(mainChannel.getClusterName()); this.mainChannel = mainChannel; }
protected ForkedClusteringService( Channel mainChannel ) { super(mainChannel.getClusterName()); this.mainChannel = mainChannel; }
private String getClusterName(final Channel channel) { if (channel != null) { String clusterName = channel.getClusterName(); // clusterName will be null if the Channel is not yet connected, but we still need it! if (clusterName == null && channel instanceof JChannel) { try { Field field = JChannel.class.getDeclaredField("cluster_name"); field.setAccessible(true); return (String)field.get(channel); } catch (Throwable t) {} } } return null; }
public ReplicatedHashMap(Channel channel, boolean persistent, long state_timeout) { this.cluster_name=channel.getClusterName(); this.channel=channel; this.persistent=persistent; init(state_timeout); }
public DistributedHashtable(Channel channel, boolean persistent, long state_timeout) { this.groupname = channel.getClusterName(); this.channel = channel; this.persistent=persistent; init(state_timeout); }
private void unregisterChannel(Channel ch) { ChannelInfo info = registeredChannels.remove(ch); if (info == null) { log.warn("Unknown channel " + ch.getClusterName()); } else { unregisterFromJmx(info); } ch.removeChannelListener(closeListener); }
public DistributedHashtable(PullPushAdapter adapter, Serializable id) { initSignatures(); this.channel = (Channel)adapter.getTransport(); this.groupname = this.channel.getClusterName(); disp=new RpcDispatcher(adapter, id, this, this, this); }
LockManagerEntry(Channel channel) { this.service = new CoreGroupCommunicationService(); this.service.setChannel(channel); this.service.setScopeId(SCOPE_ID); try { this.service.start(); } catch (Exception e) { throw new IllegalStateException("Unexpected exception while starting group communication service for " + channel.getClusterName()); } this.lockManager = new SharedLocalYieldingClusterLockManager(SERVICE_NAME, this.service, this.service); try { this.lockManager.start(); } catch (Exception e) { this.service.stop(); throw new IllegalStateException("Unexpected exception while starting lock manager for " + channel.getClusterName()); } }
throw new Exception("No MBeanServers found;" + "\nDraw needs to be run with an MBeanServer present, or inside JDK 5"); JmxConfigurator.registerChannel((JChannel)channel, server, "jgroups", channel.getClusterName(), true);
/** * Uses a user-provided PullPushAdapter to create the dispatcher rather than a Channel. If id is non-null, it will be * used to register under that id. This is typically used when another building block is already using * PullPushAdapter, and we want to add this building block in addition. The id is the used to discriminate * between messages for the various blocks on top of PullPushAdapter. If null, we will assume we are the * first block created on PullPushAdapter. * The caller needs to call start(), before using the this block. It gives the opportunity for the caller * to register as a lessoner for Notifications events. * @param adapter The PullPushAdapter which to use as underlying transport * @param id A serializable object (e.g. an Integer) used to discriminate (multiplex/demultiplex) between * requests/responses for different building blocks on top of PullPushAdapter. */ public DistributedQueue(PullPushAdapter adapter, Serializable id) { this.channel = (Channel)adapter.getTransport(); this.groupname = this.channel.getClusterName(); initSignatures(); internalQueue = new LinkedList(); disp = new RpcDispatcher(adapter, id, this, this, this); disp.setDeadlockDetection(false); // To ensure strict FIFO MethodCall }
/** * Uses a user-provided PullPushAdapter to create the dispatcher rather than a Channel. If id is non-null, it will be * used to register under that id. This is typically used when another building block is already using * PullPushAdapter, and we want to add this building block in addition. The id is the used to discriminate * between messages for the various blocks on top of PullPushAdapter. If null, we will assume we are the * first block created on PullPushAdapter. * @param adapter The PullPushAdapter which to use as underlying transport * @param id A serializable object (e.g. an Integer) used to discriminate (multiplex/demultiplex) between * requests/responses for different building blocks on top of PullPushAdapter. * @param state_timeout Max number of milliseconds to wait until state is * retrieved */ public DistributedHashtable(PullPushAdapter adapter, Serializable id, long state_timeout) throws ChannelNotConnectedException, ChannelClosedException { initSignatures(); this.channel = (Channel)adapter.getTransport(); this.groupname = this.channel.getClusterName(); disp=new RpcDispatcher(adapter, id, this, this, this); start(state_timeout); }
ClusteringImplLogger.ROOT_LOGGER.newClusterCurrentView(this.channel.getClusterName(), newGroupView.viewId, difference, merge, newGroupView.allMembers); } else { ClusteringImplLogger.ROOT_LOGGER.newClusterView(this.getGroupName(), newGroupView.viewId, this.groupView, difference, merge);