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


Java Container.getProfileIdentities方法代碼示例

本文整理匯總了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;
}
 
開發者ID:tdiesler,項目名稱:fabric8poc,代碼行數:20,代碼來源:ContainerServiceImpl.java

示例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);
    }
 
開發者ID:tdiesler,項目名稱:fabric8poc,代碼行數:12,代碼來源:ContainerServiceImpl.java

示例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);
}
 
開發者ID:tdiesler,項目名稱:fabric8poc,代碼行數:14,代碼來源:ContainerServiceImpl.java

示例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);
}
 
開發者ID:tdiesler,項目名稱:fabric8poc,代碼行數:14,代碼來源:ContainerServiceImpl.java

示例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();
    }
}
 
開發者ID:tdiesler,項目名稱:fabric8poc,代碼行數:14,代碼來源:ContainerServiceImpl.java

示例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);
}
 
開發者ID:tdiesler,項目名稱:fabric8poc,代碼行數:12,代碼來源:ContainerServiceImpl.java


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