当前位置: 首页>>代码示例>>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;未经允许,请勿转载。