com.caucho.env.deploy
Class StartLazyRedeployAutomaticStrategy

java.lang.Object
  extended by com.caucho.env.deploy.AbstractDeployControllerStrategy
      extended by com.caucho.env.deploy.StartLazyRedeployAutomaticStrategy
All Implemented Interfaces:
DeployControllerStrategy

@Module
public class StartLazyRedeployAutomaticStrategy
extends AbstractDeployControllerStrategy

The start-mode="lazy", redeploy-model="automatic" controller strategy.

input stopped active modified error
requeststartImpl- restartImplrestartImpl
includestartImpl- - -
start startImpl- restartImplrestartImpl
restartstartImpl- restartImplrestartImpl
stop - stopImplstopImpl stopImpl
alarm - - stopImpl stopImpl


Field Summary
static StartLazyRedeployAutomaticStrategy STRATEGY
           
 
Method Summary
<I extends DeployInstance>
void
alarm(DeployController<I> controller)
          Redeployment on a timeout alarm.
static DeployControllerStrategy create()
          Returns the start="lazy" redeploy="automatic" strategy
<I extends DeployInstance>
I
request(DeployController<I> controller)
          Returns the current instance for a request, redeploying if necessary.
<I extends DeployInstance>
void
startOnInit(DeployController<I> controller)
          Called at initialization time for automatic start.
<I extends DeployInstance>
I
subrequest(DeployController<I> controller)
          Returns the current instance for a subrequest like an include, starting if necessary.
<I extends DeployInstance>
void
update(DeployController<I> controller)
          Checks for updates from an admin command.
 
Methods inherited from class com.caucho.env.deploy.AbstractDeployControllerStrategy
start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STRATEGY

public static final StartLazyRedeployAutomaticStrategy STRATEGY
Method Detail

create

public static DeployControllerStrategy create()
Returns the start="lazy" redeploy="automatic" strategy

Returns:
the singleton strategy

startOnInit

public <I extends DeployInstance> void startOnInit(DeployController<I> controller)
Called at initialization time for automatic start.

Parameters:
controller - the owning controller

update

public <I extends DeployInstance> void update(DeployController<I> controller)
Checks for updates from an admin command. The target state will be the initial state, i.e. update will not start a lazy instance.

Parameters:
controller - the owning controller

request

public <I extends DeployInstance> I request(DeployController<I> controller)
Returns the current instance for a request, redeploying if necessary.

Parameters:
controller - the owning controller
Returns:
the current deploy instance

subrequest

public <I extends DeployInstance> I subrequest(DeployController<I> controller)
Returns the current instance for a subrequest like an include, starting if necessary.

Parameters:
controller - the owning controller
Returns:
the current deploy instance

alarm

public <I extends DeployInstance> void alarm(DeployController<I> controller)
Redeployment on a timeout alarm.

Parameters:
controller - the owning controller