public class DefaultInstantUpgradeManager extends Object implements InstantUpgradeManager
InstantUpgradeManager.State
INSTANT_UPGRADE
Constructor and Description |
---|
DefaultInstantUpgradeManager(JiraProperties jiraProperties) |
Modifier and Type | Method and Description |
---|---|
ServiceResult |
activateInstance()
Called when the new instance is activated in an InstantUp scenario
|
void |
doNowOrWhenInstanceBecomesActive(Runnable task,
String description)
Run this function immediately during a normal startup.
|
InstantUpgradeManager.State |
getState() |
boolean |
waitTillFullyStarted(long time,
TimeUnit unit)
Waits until the instance is fully started.
|
public DefaultInstantUpgradeManager(JiraProperties jiraProperties)
public void doNowOrWhenInstanceBecomesActive(Runnable task, String description)
InstantUpgradeManager
doNowOrWhenInstanceBecomesActive
in interface InstantUpgradeManager
task
- the function to rundescription
- description of the functionpublic InstantUpgradeManager.State getState()
getState
in interface InstantUpgradeManager
public ServiceResult activateInstance()
InstantUpgradeManager
activateInstance
in interface InstantUpgradeManager
public boolean waitTillFullyStarted(long time, TimeUnit unit) throws InterruptedException
InstantUpgradeManager
waitTillFullyStarted
in interface InstantUpgradeManager
time
- the maximum time to waitunit
- the time unit of the timeout
argumenttrue
if the count reached zero and false
if the waiting time elapsed before the count reached zeroInterruptedException
- if the current thread is interrupted
while waiting*Copyright © 2002-2017 Atlassian. All Rights Reserved.