io.cattle.platform.core.model.Volume.getAccessMode()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(115)

本文整理了Java中io.cattle.platform.core.model.Volume.getAccessMode()方法的一些代码示例,展示了Volume.getAccessMode()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Volume.getAccessMode()方法的具体详情如下:
包路径:io.cattle.platform.core.model.Volume
类名称:Volume
方法名:getAccessMode

Volume.getAccessMode介绍

[英]Getter for cattle.volume.access_mode.
[中][$0$]的Getter。

代码示例

代码示例来源:origin: rancher/cattle

if (StringUtils.isNotEmpty(accessMode) && StringUtils.isEmpty(v.getAccessMode()) && !accessMode.equals(v.getAccessMode())) {
  lockManager.lock(new InstanceVolumeAccessModeLock(v.getId()), new LockCallbackNoReturn() {
    @Override

代码示例来源:origin: rancher/cattle

List<Volume> volumes = InstanceHelpers.extractVolumesFromMounts(instance, objectManager);
for (Volume v : volumes) {
  if (VolumeConstants.ACCESS_MODE_SINGLE_HOST_RW.equals(v.getAccessMode())) {
    Long hostID = null;
    Object hostIdObject = DataAccessor.fromDataFieldOf(v).withKey(VolumeConstants.FIELD_LAST_ALLOCATED_HOST_ID).get();
      constraints.add(new VolumeAccessModeSingleHostConstraint(hostID, v.getId(), v.getName(), hostName, hardConstraint, idFormatter));
  } else if (VolumeConstants.ACCESS_MODE_SINGLE_INSTANCE_RW.equals(v.getAccessMode())) {
    List<Long> currentlyUsedBy = allocatorDao.getInstancesWithVolumeMounted(v.getId(), instance.getId());
    if (currentlyUsedBy.size() > 0) {
      constraints.add(new VolumeAccessModeSingleInstanceConstraint(v.getName(), v.getId(), v.getAccessMode(), currentlyUsedBy, idFormatter));

代码示例来源:origin: rancher/cattle

if (!VolumeConstants.ACCESS_MODE_SINGLE_INSTANCE_RW.equals(v.getAccessMode())) {
  objectManager.setFields(v, VOLUME.ACCESS_MODE, VolumeConstants.ACCESS_MODE_SINGLE_INSTANCE_RW);

代码示例来源:origin: rancher/cattle

getAllocatedHostUuidProp(v).set(candidate.getHostUuid());
if (VolumeConstants.ACCESS_MODE_SINGLE_HOST_RW.equals(v.getAccessMode())) {
  persist = true;
  DataAccessor.fromDataFieldOf(v).withKey(VolumeConstants.FIELD_LAST_ALLOCATED_HOST_ID).set(newHost);

代码示例来源:origin: rancher/cattle

boolean invalidHost = VolumeConstants.ACCESS_MODE_SINGLE_HOST_RW.equalsIgnoreCase(testVolume.getAccessMode())
    && testVolume.getHostId() != null
    && !hostIdsToDeploy.contains(testVolume.getHostId());

代码示例来源:origin: rancher/cattle

setUri(from.getUri());
setExternalId(from.getExternalId());
setAccessMode(from.getAccessMode());
setHostId(from.getHostId());
setDeploymentUnitId(from.getDeploymentUnitId());

相关文章