com.zeroturnaround.liverebel.api.impl.update
Class UpdateImpl

java.lang.Object
  extended by com.zeroturnaround.liverebel.api.impl.update.UpdateImpl
All Implemented Interfaces:
ConfigurableUpdate, PreparedPausableUpdate, PreparedUpdate

public class UpdateImpl
extends Object
implements ConfigurableUpdate

Author:
Rein Raudjärv

Constructor Summary
UpdateImpl(RestConnection con, JsonParser parser, String applicationId, String versionId)
           
 
Method Summary
 ConfigurableUpdate enableAutoStrategy(boolean ignoreWarnings)
          Use whatever-is-clever for given update.
 ConfigurableUpdate enableOffline()
          Use the off-line version update mode.
 ConfigurableUpdate enableRolling()
          Use the rolling restart update mode.
 void execute()
          Execute this update and wait until it's finished.
 PausedUpdate executeWithPause()
          Execute this update with a pause.
 boolean isOffline()
           
 boolean isRolling()
           
 ConfigurableUpdate on(Collection<String> serverIds)
          Change the version only on the given servers.
 ConfigurableUpdate on(String serverId)
          Change the version only on the given server.
 RunningUpdate start()
          Start this update.
 PausingUpdate startWithPause()
          Start this update with a pause.
 String toString()
           
 ConfigurableUpdate withTimeout(int seconds)
          Change the timeout value for: in case of HOTPATCH: waiting for current requests to finish in case of ROLLING: waiting for session drain to finish in case of OFFLINE: waiting for current socket connections to close
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UpdateImpl

public UpdateImpl(RestConnection con,
                  JsonParser parser,
                  String applicationId,
                  String versionId)
Method Detail

on

public ConfigurableUpdate on(String serverId)
Description copied from interface: ConfigurableUpdate
Change the version only on the given server.

Specified by:
on in interface ConfigurableUpdate
Parameters:
serverId - server Id.

on

public ConfigurableUpdate on(Collection<String> serverIds)
Description copied from interface: ConfigurableUpdate
Change the version only on the given servers.

Specified by:
on in interface ConfigurableUpdate
Parameters:
serverIds - server Ids.

withTimeout

public ConfigurableUpdate withTimeout(int seconds)
Description copied from interface: ConfigurableUpdate
Change the timeout value for:

Specified by:
withTimeout in interface ConfigurableUpdate
Parameters:
seconds - timeout value (in seconds).

enableOffline

public ConfigurableUpdate enableOffline()
Description copied from interface: ConfigurableUpdate
Use the off-line version update mode.

Specified by:
enableOffline in interface ConfigurableUpdate

isOffline

public boolean isOffline()

enableRolling

public ConfigurableUpdate enableRolling()
Description copied from interface: ConfigurableUpdate
Use the rolling restart update mode.

Specified by:
enableRolling in interface ConfigurableUpdate

isRolling

public boolean isRolling()

execute

public void execute()
Description copied from interface: PreparedUpdate
Execute this update and wait until it's finished.

Specified by:
execute in interface PreparedUpdate

executeWithPause

public PausedUpdate executeWithPause()
Description copied from interface: PreparedPausableUpdate
Execute this update with a pause.

While all incoming requests are blocked user can e.g. update the database and then invoke PausedUpdate.resume() when ready to finish this update.

Specified by:
executeWithPause in interface PreparedPausableUpdate
Returns:
call-back for resuming or canceling this update.

start

public RunningUpdate start()
Description copied from interface: PreparedUpdate
Start this update.

Specified by:
start in interface PreparedUpdate

startWithPause

public PausingUpdate startWithPause()
Description copied from interface: PreparedPausableUpdate
Start this update with a pause.

Specified by:
startWithPause in interface PreparedPausableUpdate

enableAutoStrategy

public ConfigurableUpdate enableAutoStrategy(boolean ignoreWarnings)
Description copied from interface: ConfigurableUpdate
Use whatever-is-clever for given update. Ignore warnings shows if we want to hotpatch when compatible-with-warnings.

Specified by:
enableAutoStrategy in interface ConfigurableUpdate

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.