GigaSpaces XAP 7.1 API

org.openspaces.grid.esm
Class NullElasticScaleHandler

java.lang.Object
  extended by org.openspaces.grid.esm.NullElasticScaleHandler
All Implemented Interfaces:
ElasticScaleHandler

public class NullElasticScaleHandler
extends Object
implements ElasticScaleHandler


Constructor Summary
NullElasticScaleHandler()
           
 
Method Summary
 boolean accept(Machine machine)
          A machine can be accepted/not-accepted (filtered) for whatever reason at any point in time.
 void init(ElasticScaleHandlerConfig config)
          An initialization call, parameterized with the configuration used at deployment.
 void scaleIn(Machine machine)
          A scale in request to terminate a machine.
 void scaleOut(ElasticScaleHandlerContext context)
          A scale out request to start a machine.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullElasticScaleHandler

public NullElasticScaleHandler()
Method Detail

init

public void init(ElasticScaleHandlerConfig config)
Description copied from interface: ElasticScaleHandler
An initialization call, parameterized with the configuration used at deployment.

Specified by:
init in interface ElasticScaleHandler
Parameters:
config - The scale configuration.

accept

public boolean accept(Machine machine)
Description copied from interface: ElasticScaleHandler
A machine can be accepted/not-accepted (filtered) for whatever reason at any point in time. This will prevent from a GSC to be started on it.

Specified by:
accept in interface ElasticScaleHandler
Parameters:
machine - The machine to accept to filter.
Returns:
true to use this machine to start a GSC on; false to skip it.

scaleOut

public void scaleOut(ElasticScaleHandlerContext context)
Description copied from interface: ElasticScaleHandler
A scale out request to start a machine. Implementation may choose to block until it has scaled out (which will cause the ESM to wait until the call has returned, preventing it from handling other processing units). It's advised to scale out asynchronously due to long startup delays. As long as the machine has not been discovered, the ESM will repeatedly call this method until a new machine has been allocated. It's up to the implementation class to maintain the state and not allocate new resources before the pending allocations have completed. When a new machine is started, it should start a Grid Service Agent (GSA).

Specified by:
scaleOut in interface ElasticScaleHandler
Parameters:
context - Context details

scaleIn

public void scaleIn(Machine machine)
Description copied from interface: ElasticScaleHandler
A scale in request to terminate a machine. Implementation may choose to ignore it, or decide to terminate considering cost/benefit factors. Will be called only once per-last GSC on this machine to terminate. Implementation may choose to block until it has scaled in (which will cause the ESM to wait until the call has returned, preventing it from handling other processing units).

Specified by:
scaleIn in interface ElasticScaleHandler
Parameters:
machine - The machine to terminate.

GigaSpaces XAP 7.1 API

Copyright © GigaSpaces.