本文整理匯總了Java中io.fabric8.api.Container.getProfileIdentities方法的典型用法代碼示例。如果您正苦於以下問題:Java Container.getProfileIdentities方法的具體用法?Java Container.getProfileIdentities怎麽用?Java Container.getProfileIdentities使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類io.fabric8.api.Container
的用法示例。
在下文中一共展示了Container.getProfileIdentities方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: startContainerInternal
import io.fabric8.api.Container; //導入方法依賴的package包/類
private Container startContainerInternal(Container container, ProvisionEventListener listener) throws ProvisionException {
LOGGER.info("Start container: {}", container);
if (container.getProfileVersion() == null) {
Profile defaultProfile = profileService.get().getDefaultProfile();
setVersionInternal(container, defaultProfile.getVersion(), listener);
addProfilesInternal(container, Collections.singletonList(defaultProfile.getIdentity()), listener);
}
// Start the container
ContainerRegistry registry = containerRegistry.get();
container = registry.startContainer(container.getIdentity());
// Provision the container profiles
VersionIdentity version = container.getProfileVersion();
List<ProfileIdentity> identities = container.getProfileIdentities();
provisionProfilesInternal(container, version, identities, listener);
return container;
}
示例2: setVersionInternal
import io.fabric8.api.Container; //導入方法依賴的package包/類
private Container setVersionInternal(Container container, VersionIdentity nextVersion, ProvisionEventListener listener) throws ProvisionException {
LOGGER.info("Set container version: {} <= {}", container, nextVersion);
// Provision the next profiles
List<ProfileIdentity> identities = container.getProfileIdentities();
provisionProfilesInternal(container, nextVersion, identities, listener);
ContainerRegistry registry = containerRegistry.get();
return registry.setProfileVersion(container.getIdentity(), nextVersion);
}
示例3: addProfilesInternal
import io.fabric8.api.Container; //導入方法依賴的package包/類
private Container addProfilesInternal(Container container, List<ProfileIdentity> profiles, ProvisionEventListener listener) throws ProvisionException {
LOGGER.info("Add container profiles: {} <= {}", container, profiles);
// Provision the profiles
VersionIdentity version = container.getProfileVersion();
List<ProfileIdentity> effective = new ArrayList<>(container.getProfileIdentities());
effective.addAll(profiles);
provisionProfilesInternal(container, version, effective, listener);
// Update the references
ContainerRegistry registry = containerRegistry.get();
return registry.addProfiles(container.getIdentity(), profiles);
}
示例4: removeProfilesInternal
import io.fabric8.api.Container; //導入方法依賴的package包/類
private Container removeProfilesInternal(Container container, List<ProfileIdentity> profiles, ProvisionEventListener listener) throws ProvisionException {
LOGGER.info("Remove container profiles: {} => {}", container, profiles);
// Unprovision the profiles
VersionIdentity version = container.getProfileVersion();
List<ProfileIdentity> effective = new ArrayList<>(container.getProfileIdentities());
effective.removeAll(profiles);
provisionProfilesInternal(container, version, effective, listener);
// Update the references
ContainerRegistry registry = containerRegistry.get();
return registry.removeProfiles(container.getIdentity(), profiles);
}
示例5: getEffectiveProfile
import io.fabric8.api.Container; //導入方法依賴的package包/類
@Override
public Profile getEffectiveProfile(ContainerIdentity identity) {
assertValid();
LockHandle readLock = aquireReadLock(identity);
try {
Container container = getRequiredContainer(identity);
VersionIdentity version = container.getProfileVersion();
List<ProfileIdentity> identities = container.getProfileIdentities();
return getEffectiveProfileInternal(container, version, identities);
} finally {
readLock.unlock();
}
}
示例6: updateProfile
import io.fabric8.api.Container; //導入方法依賴的package包/類
@Override
public void updateProfile(ProfileIdentity profile, ProvisionEventListener listener) throws ProvisionException {
Container container = getCurrentContainer();
LOGGER.info("Update container profile: {} <= {}", container, profile);
// Provision the profile
VersionIdentity version = container.getProfileVersion();
List<ProfileIdentity> identities = container.getProfileIdentities();
provisionProfilesInternal(container, version, identities, listener);
}