org.fusesource.fabric.commands.support
Class ContainerUpgradeSupport
java.lang.Object
org.apache.karaf.shell.console.AbstractAction
org.apache.karaf.shell.console.OsgiCommandSupport
org.fusesource.fabric.boot.commands.support.FabricCommand
org.fusesource.fabric.commands.support.ContainerUpgradeSupport
- All Implemented Interfaces:
- org.apache.felix.gogo.commands.Action, org.apache.karaf.shell.console.BundleContextAware
- Direct Known Subclasses:
- ContainerRollback, ContainerUpgrade
public abstract class ContainerUpgradeSupport
- extends FabricCommand
| Fields inherited from class org.apache.karaf.shell.console.OsgiCommandSupport |
bundleContext, usedReferences |
| Fields inherited from class org.apache.karaf.shell.console.AbstractAction |
log, session |
| Methods inherited from class org.fusesource.fabric.boot.commands.support.FabricCommand |
checkFabricAvailable, doesContainerExist, getConfigurationAdmin, getContainer, getFabricService, getProfile, getProfiles, getProfiles, getZooKeeper, percentText, setConfigurationAdmin, setFabricService, setZooKeeper, toString |
| Methods inherited from class org.apache.karaf.shell.console.OsgiCommandSupport |
execute, getAllServices, getBundleContext, getService, setBundleContext, ungetServices |
| Methods inherited from class org.apache.karaf.shell.console.AbstractAction |
doExecute |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContainerUpgradeSupport
public ContainerUpgradeSupport()
getProfilesForUpgradeOrRollback
protected Profile[] getProfilesForUpgradeOrRollback(Profile[] existingProfiles,
Version targetVersion)
- Gets the profiles for upgrade/rollback
- Parameters:
existingProfiles - the existing profilestargetVersion - the target version
- Returns:
- the new profiles to be used
canUpgrade
protected int canUpgrade(Version version,
Container container)
- Compare the version with the container
- Parameters:
version - the version to rollback tocontainer - the container
- Returns:
- -1 if cannot rollback, 0 if same version, or 1 if can rollback
canRollback
protected int canRollback(Version version,
Container container)
- Compare the version with the container
- Parameters:
version - the version to rollback tocontainer - the container
- Returns:
- -1 if cannot rollback, 0 if same version, or 1 if can rollback
Copyright © 2012 FuseSource. All Rights Reserved.