本文整理了Java中io.cattle.platform.core.model.Instance.getServiceIndexId()
方法的一些代码示例,展示了Instance.getServiceIndexId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Instance.getServiceIndexId()
方法的具体详情如下:
包路径:io.cattle.platform.core.model.Instance
类名称:Instance
方法名:getServiceIndexId
[英]Getter for cattle.instance.service_index_id
.
[中]cattle.instance.service_index_id
的Getter。
代码示例来源:origin: rancher/cattle
@Override
protected void populatedData(Account system, List<Object> toCreate) {
List<Instance> instances = objectManager
.find(Instance.class, INSTANCE.REMOVED, new Condition(ConditionType.NULL));
List<ServiceIndex> serviceIndexes = objectManager
.find(ServiceIndex.class, SERVICE_INDEX.REMOVED, new Condition(ConditionType.NULL));
Map<Long, ServiceIndex> serviceIndexIdsToIndexes = new HashMap<>();
for (ServiceIndex index : serviceIndexes) {
serviceIndexIdsToIndexes.put(index.getId(), index);
}
for (Instance instance : instances) {
Long indexId = instance.getServiceIndexId();
if (indexId == null) {
continue;
}
ServiceIndex index = serviceIndexIdsToIndexes.get(indexId);
if (index == null) {
continue;
}
Map<String, Object> data = new HashMap<>();
data.put(InstanceConstants.FIELD_SERVICE_INSTANCE_SERVICE_INDEX, index.getServiceIndex());
objectManager.setFields(instance, data);
}
}
}
代码示例来源:origin: rancher/cattle
public DefaultDeploymentUnitInstance(DeploymentServiceContext context, String uuid,
Service service, String instanceName, Instance instance, String launchConfigName) {
super(context, uuid, service, launchConfigName);
this.instanceName = instanceName;
this.instance = instance;
if (this.instance != null) {
exposeMap = context.exposeMapDao.findInstanceExposeMap(this.instance);
Long svcIndexId = instance.getServiceIndexId();
if (svcIndexId != null) {
serviceIndex = context.objectManager
.loadResource(ServiceIndex.class, svcIndexId);
}
} else {
this.serviceIndex = createServiceIndex();
}
setStartOnce(service, launchConfigName);
}
代码示例来源:origin: rancher/cattle
if (objectDisks instanceof List<?>) {
String namePrefix = instance.getName();
Long svcIndexId = instance.getServiceIndexId();
代码示例来源:origin: rancher/cattle
setVersion(from.getVersion());
setHealthUpdated(from.getHealthUpdated());
setServiceIndexId(from.getServiceIndexId());
setDnsInternal(from.getDnsInternal());
setDnsSearchInternal(from.getDnsSearchInternal());
内容来源于网络,如有侵权,请联系作者删除!