當前位置: 首頁>>代碼示例>>Java>>正文


Java ClusterDetailsVO.getValue方法代碼示例

本文整理匯總了Java中com.cloud.dc.ClusterDetailsVO.getValue方法的典型用法代碼示例。如果您正苦於以下問題:Java ClusterDetailsVO.getValue方法的具體用法?Java ClusterDetailsVO.getValue怎麽用?Java ClusterDetailsVO.getValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.cloud.dc.ClusterDetailsVO的用法示例。


在下文中一共展示了ClusterDetailsVO.getValue方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getSupportsResigning

import com.cloud.dc.ClusterDetailsVO; //導入方法依賴的package包/類
@Override
public boolean getSupportsResigning(long clusterId) {
    ClusterVO cluster = findById(clusterId);

    if (cluster == null || cluster.getAllocationState() != Grouping.AllocationState.Enabled) {
        return false;
    }

    ClusterDetailsVO clusterDetailsVO = clusterDetailsDao.findDetail(clusterId, "supportsResign");

    if (clusterDetailsVO != null) {
        String value = clusterDetailsVO.getValue();

        return Boolean.parseBoolean(value);
    }

    return false;
}
 
開發者ID:apache,項目名稱:cloudstack,代碼行數:19,代碼來源:ClusterDaoImpl.java

示例2: findClusterDetails

import com.cloud.dc.ClusterDetailsVO; //導入方法依賴的package包/類
public static String findClusterDetails(final long clusterId, final String name) {
    final ClusterDetailsVO detailsVO = s_clusterDetailsDao.findDetail(clusterId, name);
    if (detailsVO != null) {
        return detailsVO.getValue();
    }

    return null;
}
 
開發者ID:MissionCriticalCloud,項目名稱:cosmic,代碼行數:9,代碼來源:ApiDBUtils.java

示例3: findClusterDetails

import com.cloud.dc.ClusterDetailsVO; //導入方法依賴的package包/類
public static String findClusterDetails(long clusterId, String name) {
    ClusterDetailsVO detailsVO = s_clusterDetailsDao.findDetail(clusterId, name);
    if (detailsVO != null) {
        return detailsVO.getValue();
    }

    return null;
}
 
開發者ID:apache,項目名稱:cloudstack,代碼行數:9,代碼來源:ApiDBUtils.java

示例4: getSolidFireVolumeAccessGroupId

import com.cloud.dc.ClusterDetailsVO; //導入方法依賴的package包/類
@Override
public long getSolidFireVolumeAccessGroupId(String csClusterUuid, String storagePoolUuid) {
    long csClusterId = util.getClusterIdForClusterUuid(csClusterUuid);
    long storagePoolId = util.getStoragePoolIdForStoragePoolUuid(storagePoolUuid);

    ClusterDetailsVO clusterDetails = clusterDetailsDao.findDetail(csClusterId, SolidFireUtil.getVagKey(storagePoolId));
    String sfVagId = clusterDetails.getValue();

    return Long.parseLong(sfVagId);
}
 
開發者ID:apache,項目名稱:cloudstack,代碼行數:11,代碼來源:SolidFireIntegrationTestManagerImpl.java

示例5: removeVolumeFromVag

import com.cloud.dc.ClusterDetailsVO; //導入方法依賴的package包/類
private void removeVolumeFromVag(long storagePoolId, long clusterId) {
    long sfVolumeId = getVolumeId(storagePoolId);
    ClusterDetailsVO clusterDetail = _clusterDetailsDao.findDetail(clusterId, SolidFireUtil.getVagKey(storagePoolId));

    String vagId = clusterDetail != null ? clusterDetail.getValue() : null;

    if (vagId != null) {
        SolidFireUtil.SolidFireConnection sfConnection = SolidFireUtil.getSolidFireConnection(storagePoolId, _storagePoolDetailsDao);

        SolidFireUtil.SolidFireVag sfVag = SolidFireUtil.getVag(sfConnection, Long.parseLong(vagId));

        long[] volumeIds = SolidFireUtil.getNewVolumeIds(sfVag.getVolumeIds(), sfVolumeId, false);

        SolidFireUtil.modifyVag(sfConnection, sfVag.getId(), sfVag.getInitiators(), volumeIds);
    }
}
 
開發者ID:apache,項目名稱:cloudstack,代碼行數:17,代碼來源:SolidFireSharedPrimaryDataStoreLifeCycle.java

示例6: revokeAccess

import com.cloud.dc.ClusterDetailsVO; //導入方法依賴的package包/類
@Override
public void revokeAccess(DataObject dataObject, Host host, DataStore dataStore)
{
    if (dataObject == null || host == null || dataStore == null) {
        return;
    }

    long sfVolumeId = getSolidFireVolumeId(dataObject, false);
    long clusterId = host.getClusterId();
    long storagePoolId = dataStore.getId();

    ClusterVO cluster = clusterDao.findById(clusterId);

    GlobalLock lock = GlobalLock.getInternLock(cluster.getUuid());

    if (!lock.lock(LOCK_TIME_IN_SECONDS)) {
        String errMsg = "Couldn't lock the DB (in revokeAccess) on the following string: " + cluster.getUuid();

        LOGGER.debug(errMsg);

        throw new CloudRuntimeException(errMsg);
    }

    try {
        ClusterDetailsVO clusterDetail = clusterDetailsDao.findDetail(clusterId, SolidFireUtil.getVagKey(storagePoolId));

        String vagId = clusterDetail != null ? clusterDetail.getValue() : null;

        if (vagId != null) {
            SolidFireUtil.SolidFireConnection sfConnection = SolidFireUtil.getSolidFireConnection(storagePoolId, storagePoolDetailsDao);

            SolidFireUtil.SolidFireVag sfVag = SolidFireUtil.getVag(sfConnection, Long.parseLong(vagId));

            long[] volumeIds = SolidFireUtil.getNewVolumeIds(sfVag.getVolumeIds(), sfVolumeId, false);

            SolidFireUtil.modifyVag(sfConnection, sfVag.getId(), sfVag.getInitiators(), volumeIds);
        }
    }
    finally {
        lock.unlock();
        lock.releaseRef();
    }
}
 
開發者ID:apache,項目名稱:cloudstack,代碼行數:44,代碼來源:SolidFirePrimaryDataStoreDriver.java

示例7: hostAddedToOrRemovedFromCluster

import com.cloud.dc.ClusterDetailsVO; //導入方法依賴的package包/類
public static void hostAddedToOrRemovedFromCluster(long hostId, long clusterId, boolean added, String storageProvider,
        ClusterDao clusterDao, ClusterDetailsDao clusterDetailsDao, PrimaryDataStoreDao storagePoolDao,
        StoragePoolDetailsDao storagePoolDetailsDao, HostDao hostDao) {
    ClusterVO cluster = clusterDao.findById(clusterId);

    GlobalLock lock = GlobalLock.getInternLock(cluster.getUuid());

    if (!lock.lock(s_lockTimeInSeconds)) {
        String errMsg = "Couldn't lock the DB on the following string: " + cluster.getUuid();

        s_logger.debug(errMsg);

        throw new CloudRuntimeException(errMsg);
    }

    try {
        List<StoragePoolVO> storagePools = storagePoolDao.findPoolsByProvider(storageProvider);

        if (storagePools != null && storagePools.size() > 0) {
            List<SolidFireUtil.SolidFireConnection> sfConnections = new ArrayList<>();

            for (StoragePoolVO storagePool : storagePools) {
                ClusterDetailsVO clusterDetail = clusterDetailsDao.findDetail(clusterId, SolidFireUtil.getVagKey(storagePool.getId()));

                String vagId = clusterDetail != null ? clusterDetail.getValue() : null;

                if (vagId != null) {
                    SolidFireUtil.SolidFireConnection sfConnection = SolidFireUtil.getSolidFireConnection(storagePool.getId(), storagePoolDetailsDao);

                    if (!sfConnections.contains(sfConnection)) {
                        sfConnections.add(sfConnection);

                        SolidFireUtil.SolidFireVag sfVag = SolidFireUtil.getVag(sfConnection, Long.parseLong(vagId));

                        List<HostVO> hostsToAddOrRemove = new ArrayList<>();
                        HostVO hostToAddOrRemove = hostDao.findByIdIncludingRemoved(hostId);

                        hostsToAddOrRemove.add(hostToAddOrRemove);

                        String[] hostIqns = SolidFireUtil.getNewHostIqns(sfVag.getInitiators(), SolidFireUtil.getIqnsFromHosts(hostsToAddOrRemove), added);

                        SolidFireUtil.modifyVag(sfConnection, sfVag.getId(), hostIqns, sfVag.getVolumeIds());
                    }
                }
            }
        }
    }
    finally {
        lock.unlock();
        lock.releaseRef();
    }
}
 
開發者ID:apache,項目名稱:cloudstack,代碼行數:53,代碼來源:SolidFireUtil.java


注:本文中的com.cloud.dc.ClusterDetailsVO.getValue方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。