org.ops4j.pax.radman.service.bundleManager.jobs.containerUpgrade
Class ContainerUpgradeJobParam

java.lang.Object
  extended by org.ops4j.pax.radman.service.bundleManager.jobs.containerUpgrade.ContainerUpgradeJobParam
All Implemented Interfaces:
java.io.Serializable, JobParam

public final class ContainerUpgradeJobParam
extends java.lang.Object
implements JobParam

The algorithm to upgrade:

  1. Verify the currentContainerLocation to ensure the directory exists;
  2. Verify the newContainerLocation is either a directory or not found. Create the container location directory if not found;
  3. Download all zip urls. All the zip files along with their md5 are downloaded and verified; Failing at this point will not execute fail upgrade job services;
  4. Execute each pre upgrade job service with maximum wait per job execution. For example, stops bundles to release precious resources such as ports. If fail, execute fail upgrade job services;
  5. Copy the content of currentContainerLocation to newContainerLocation. If fail, execute fail upgrade job services;
  6. Start OSGi container at new container location. If fail, execute fail upgrade job services;
  7. Execute post upgrade job service. If fail, execute fail upgrade job services;
  8. Stop current container;

Since:
0.1.0
Author:
Edward Yakop
See Also:
Serialized Form

Nested Class Summary
static class ContainerUpgradeJobParam.ExecuteNewProcessInfo
           
static class ContainerUpgradeJobParam.JobEntry
           
 
Constructor Summary
ContainerUpgradeJobParam(java.lang.String aCurrentContainerLocation, java.lang.String aNewContainerLocation, ContainerUpgradeJobParam.ExecuteNewProcessInfo anInfo, java.lang.String... zipURLs)
           
 
Method Summary
 java.lang.String getCurrentContainerLocation()
          Returns the current container location.
 long getDelayBeforeExecutingPostUpgradeJobs()
           
 ContainerUpgradeJobParam.JobEntry[] getFailUpgradeJobServices()
           
 ContainerUpgradeJobParam.ExecuteNewProcessInfo getInfo()
           
 long getMaximumWaitForAllPostUpgradeJobExecutionBeforeFail()
           
 java.lang.String getNewContainerLocation()
           
 ContainerUpgradeJobParam.JobEntry[] getPostUpgradeJobServices()
           
 ContainerUpgradeJobParam.JobEntry[] getPreUpgradeJobServices()
           
 java.lang.String[] getZipURLs()
           
 void setDelayBeforeExecutingPostUpgradeJobs(long timeInMilliSeconds)
           
 void setFailUpgradeJobServices(ContainerUpgradeJobParam.JobEntry... entries)
           
 void setMaximumWaitForAllPostUpgradeJobExecutionBeforeFail(long timeInMilliSeconds)
           
 void setPostUpgradeJobServices(ContainerUpgradeJobParam.JobEntry... entries)
           
 void setPreUpgradeJobServices(ContainerUpgradeJobParam.JobEntry... entries)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainerUpgradeJobParam

public ContainerUpgradeJobParam(java.lang.String aCurrentContainerLocation,
                                java.lang.String aNewContainerLocation,
                                ContainerUpgradeJobParam.ExecuteNewProcessInfo anInfo,
                                java.lang.String... zipURLs)
                         throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException
Method Detail

getCurrentContainerLocation

public final java.lang.String getCurrentContainerLocation()
Returns the current container location.

Returns:
The current container location.
Since:
0.1.0

getNewContainerLocation

public final java.lang.String getNewContainerLocation()

getZipURLs

public final java.lang.String[] getZipURLs()

getInfo

public final ContainerUpgradeJobParam.ExecuteNewProcessInfo getInfo()

setPreUpgradeJobServices

public final void setPreUpgradeJobServices(ContainerUpgradeJobParam.JobEntry... entries)

getPreUpgradeJobServices

public final ContainerUpgradeJobParam.JobEntry[] getPreUpgradeJobServices()

setMaximumWaitForAllPostUpgradeJobExecutionBeforeFail

public final void setMaximumWaitForAllPostUpgradeJobExecutionBeforeFail(long timeInMilliSeconds)

getMaximumWaitForAllPostUpgradeJobExecutionBeforeFail

public final long getMaximumWaitForAllPostUpgradeJobExecutionBeforeFail()

setDelayBeforeExecutingPostUpgradeJobs

public final void setDelayBeforeExecutingPostUpgradeJobs(long timeInMilliSeconds)

getDelayBeforeExecutingPostUpgradeJobs

public final long getDelayBeforeExecutingPostUpgradeJobs()

setPostUpgradeJobServices

public final void setPostUpgradeJobServices(ContainerUpgradeJobParam.JobEntry... entries)

getPostUpgradeJobServices

public final ContainerUpgradeJobParam.JobEntry[] getPostUpgradeJobServices()

setFailUpgradeJobServices

public final void setFailUpgradeJobServices(ContainerUpgradeJobParam.JobEntry... entries)

getFailUpgradeJobServices

public final ContainerUpgradeJobParam.JobEntry[] getFailUpgradeJobServices()


Copyright © 2008. All Rights Reserved.