@Override public String getPartitionName() { return this.partition.getPartitionName(); }
public String getPartitionName() { return this.partition == null ? null : this.partition.getPartitionName(); }
public String getPartitionName () { return clusterPartition.getPartitionName(); }
public String getPartitionName() { return (this.partition == null) ? this.partitionName : this.partition.getPartitionName(); }
public String getPartitionName() { return this.partition.getPartitionName(); }
public String getPartitionName() { return this.clusterPartition.getPartitionName(); }
/** * Deregister a partition from this locator. * * @param partition the partition */ public void deregisterHAPartition(HAPartition partition) { if (partition != null) registeredPartitions.remove(partition.getPartitionName()); }
/** * Register a partition with this locator. * * @param partition the partition */ public void registerHAPartition(HAPartition partition) { if (partition != null) registeredPartitions.put(partition.getPartitionName(), partition); }
private ObjectName getObjectName() throws Exception { return new ObjectName("jboss:service=" + SERVICE_NAME + ",partition=" + this.partition.getPartitionName()); }
@Override public String toString() { return new StringBuilder(super.toString()) .append("{replicantName=") .append(replicantName) .append(",partition=") .append(partition.getPartitionName()) .append(",clusterViewId=") .append(clusterViewId) .append(",allowInvocationsStatus=") .append(allowInvocationsStatus) .append(",replicants=") .append(replicants) .append('}') .toString(); }
public DistributedReplicantManagerImpl(HAPartition partition) { super(); this.partition = partition; this.log = Logger.getLogger(this.getClass().getName() + "." + partition.getPartitionName()); // JBAS-5068 Create the handler early so we don't risk NPEs this.asynchHandler = new AsynchEventHandler(this, "AsynchKeyChangeHandler"); }
@Override protected void createService() throws Exception { if (this.clusterPartition == null) { throw new IllegalStateException("HAPartition property must be set before starting HAJNDI service"); } if (this.distributedTreeManager == null) { throw new IllegalStateException("DistributedTreeManager property must be set before starting HAJNDI service"); } this.log.debug("Initializing HAJNDI server on partition: " + this.clusterPartition.getPartitionName()); // Start HAJNDI service this.theServer = new HAJNDI(this.clusterPartition, this.distributedTreeManager, localNamingInstance); // Build the Naming interface method map Map<Long, Method> map = new HashMap<Long, Method>(13); Method[] methods = Naming.class.getMethods(); for (Method method: methods) { Long hash = new Long(MarshalledInvocation.calculateHash(method)); map.put(hash, method); } this.marshalledInvocationMapping = Collections.unmodifiableMap(map); // share instance for in-vm discovery NamingContext.setHANamingServerForPartition(this.clusterPartition.getPartitionName(), this.theServer); }
@ManagementProperty(use={ViewUse.STATISTIC}, description="The name of the HAPartition this service is associated with") public String getPartitionName() { return this.service.getHAPartition().getPartitionName(); }
@Override protected void stopService() throws Exception { // un-share instance for in-vm discovery NamingContext.removeHANamingServerForPartition(this.clusterPartition.getPartitionName()); // Stop listener ServerSocket s = this.bootstrapSocket; this.bootstrapSocket = null; if (s != null) { this.log.debug("Closing the HAJNDI bootstrap listener"); s.close(); } // Stop HAJNDI service this.log.debug("Stopping the HAJNDI service"); this.theServer.shutdown(); this.log.debug("Stopping AutomaticDiscovery"); if (this.autoDiscovery != null && this.discoveryDisabled == false) { this.autoDiscovery.stop(); } }
if (name.equals(DetachedHANamingService.this.clusterPartition.getPartitionName()) == false)
public Invoker createProxy(ObjectName beanName, LoadBalancePolicy policy, String proxyFamilyName) throws Exception { Integer hash = new Integer(beanName.hashCode()); HATarget target = (HATarget) beanMap.get(hash); if(target == null) { throw new IllegalStateException("The bean hashCode not found"); } String familyName = proxyFamilyName; if(familyName == null) { familyName = target.getAssociatedPartition().getPartitionName() + "/" + beanName; } return createProxy(getStrictRMIException(), target.getReplicantList(), policy, proxyFamilyName, target.getCurrentViewId()); }
this.log = Logger.getLogger(this.getClass()); this.intf = intf; this.key = partition.getPartitionName() + "/" + replicantName;
protected void startService() throws Exception String partitionName = partition.getPartitionName(); this.drm = partition.getDistributedReplicantManager();
isMaster + ", viewID=" + newViewId + ", partition=" + getHAPartition().getPartitionName() );