public String getLocalNodeName() { ClusterNode localNode = this.partition == null ? null : this.partition.getClusterNode(); return localNode == null ? null : localNode.getName(); }
public void init() throws Exception { this.partition.registerRPCHandler(this.sessionStateIdentifier, this); this.partition.subscribeToStateTransferEvents(HA_SESSION_STATE_STATE_TRANSFER, this); }
/** * Create a new TransactionStickyFirstAvailable. */ public TransactionStickyFirstAvailable() { super(new FirstAvailable()); }
@Override public String getPartitionName() { return this.partition.getPartitionName(); }
@Override protected void stopService() throws Exception { this.partition.unregisterMembershipListener(this); }
@Override public String getNodeName() { return this.me == null ? null : this.me.getName(); }
public void updateClusterInfo (List<?> targets, long viewId) { if (familyClusterInfo != null) this.familyClusterInfo.updateClusterInfo (targets, viewId); }
protected void removeDeadTarget(Object target) { //System.out.println("Size before : " + Integer.toString(targets.length)); if (this.familyClusterInfo != null) this.familyClusterInfo.removeDeadTarget (target); }
/** * @see org.jboss.system.ServiceMBeanSupport#destroyService() */ @Override protected void destroyService() throws Exception { this.service.destroy(); }
/** * * Override this method only if you need to provide a custom partition wide unique service name. * The default implementation will usually work, provided that * the getServiceName() method returns a unique canonical MBean name. * * @return partition wide unique service name */ public String getServiceHAName() { return this.service.getServiceHAName(); }
public Object chooseTarget (FamilyClusterInfo clusterFamily) { return chooseTarget(clusterFamily, null); } public Object chooseTarget (FamilyClusterInfo clusterFamily, Invocation routingDecision)
/** * @see org.jboss.system.ServiceMBeanSupport#createService() */ @Override protected void createService() throws Exception { this.service.create(); }
@SuppressWarnings("unchecked") protected <T> List<T> callMethodOnPartition(String methodName, Object[] args, Class<?>[] types) throws Exception { GroupRpcDispatcher dispatcher = this.partition; return (List<T>) dispatcher.callMethodOnCluster(this.name, methodName, args, types, true); }
/** * Create a new TransactionStickyRandomRobin. */ public TransactionStickyRandomRobin() { super(new RandomRobin()); }
public Object chooseTarget (FamilyClusterInfo clusterFamily) { return chooseTarget(clusterFamily, null); } public Object chooseTarget (FamilyClusterInfo clusterFamily, Invocation routingDecision)
public Object chooseTarget (FamilyClusterInfo clusterFamily) { return this.chooseTarget(clusterFamily, null); } public Object chooseTarget (FamilyClusterInfo clusterFamily, Invocation routingDecision)
/** * Create a new TransactionStickyRoundRobin. */ public TransactionStickyRoundRobin() { super(new RoundRobin()); }
/** * Create a new TransactionStickyFirstAvailableIdenticalAllProxies. * */ public TransactionStickyFirstAvailableIdenticalAllProxies() { super(new FirstAvailableIdenticalAllProxies()); }
@Override public boolean needMoreResponses() { return filter.needMoreResponses(); } }
public void updateClusterInfo (List<?> targets, long viewId) { if (familyClusterInfo != null) this.familyClusterInfo.updateClusterInfo (targets, viewId); }