@Override public int compareTo(ClusterGroup clusterGroup) { return _clusterGroup.compareTo(clusterGroup); }
/** * Returns the cluster group ID of this cluster group. * * @return the cluster group ID of this cluster group */ @Override public long getClusterGroupId() { return _clusterGroup.getClusterGroupId(); }
/** * Returns the cluster node IDs of this cluster group. * * @return the cluster node IDs of this cluster group */ @Override public String getClusterNodeIds() { return _clusterGroup.getClusterNodeIds(); }
public static ClusterGroupSoap toSoapModel(ClusterGroup model) { ClusterGroupSoap soapModel = new ClusterGroupSoap(); soapModel.setMvccVersion(model.getMvccVersion()); soapModel.setClusterGroupId(model.getClusterGroupId()); soapModel.setName(model.getName()); soapModel.setClusterNodeIds(model.getClusterNodeIds()); soapModel.setWholeCluster(model.isWholeCluster()); return soapModel; }
protected FutureClusterResponses doAction() throws ManageActionException { MethodHandler manageActionMethodHandler = PortalManagerUtil.createManageActionMethodHandler(_manageAction); ClusterRequest clusterRequest = null; if (_clusterGroup.isWholeCluster()) { clusterRequest = ClusterRequest.createMulticastRequest( manageActionMethodHandler); } else { verifyClusterGroup(); clusterRequest = ClusterRequest.createUnicastRequest( manageActionMethodHandler, _clusterGroup.getClusterNodeIdsArray()); } return ClusterExecutorUtil.execute(clusterRequest); }
@Override public String[] getClusterNodeIdsArray() { return _clusterGroup.getClusterNodeIdsArray(); }
/** * Returns the mvcc version of this cluster group. * * @return the mvcc version of this cluster group */ @Override public long getMvccVersion() { return _clusterGroup.getMvccVersion(); }
/** * Returns the name of this cluster group. * * @return the name of this cluster group */ @Override public String getName() { return _clusterGroup.getName(); }
/** * Returns the primary key of this cluster group. * * @return the primary key of this cluster group */ @Override public long getPrimaryKey() { return _clusterGroup.getPrimaryKey(); }
@Override public ExpandoBridge getExpandoBridge() { return _clusterGroup.getExpandoBridge(); }
@Override public Serializable getPrimaryKeyObj() { return _clusterGroup.getPrimaryKeyObj(); }
@Override public Object clone() { return new ClusterGroupWrapper((ClusterGroup)_clusterGroup.clone()); }
protected void verifyClusterGroup() throws ManageActionException { List<ClusterNode> clusterNodes = ClusterExecutorUtil.getClusterNodes(); String[] requiredClusterNodesIds = _clusterGroup.getClusterNodeIdsArray(); for (String requiredClusterNodeId : requiredClusterNodesIds) { boolean verified = false; Iterator<ClusterNode> itr = clusterNodes.iterator(); while (itr.hasNext()) { ClusterNode clusterNode = itr.next(); String clusterNodeId = clusterNode.getClusterNodeId(); if (clusterNodeId.equals(requiredClusterNodeId)) { itr.remove(); verified = true; break; } } if (!verified) { throw new ManageActionException( "Cluster node " + requiredClusterNodeId + " is not available"); } } }
@Override public Long get(ClusterGroup clusterGroup) { return clusterGroup.getClusterGroupId(); }