public class DefaultGateway extends Object implements Gateway
Constructor and Description |
---|
DefaultGateway(InternalAdmin admin,
String gatewayName) |
Modifier and Type | Method and Description |
---|---|
GatewayDelegator |
getDelegator(String targetGatewayName)
Returns a gateway delegator which has a target gateway with the given name.
|
GatewayProcessingUnit |
getGatewayProcessingUnit(String processingUnitName)
Returns the gateway processing unit for the given processing unit name.
|
GatewayProcessingUnit[] |
getGatewayProcessingUnits()
Returns all the currently deployed
GatewayProcessingUnit s. |
String |
getName()
Returns the name which is used by the other gateways to locate this gateway.
|
Map<String,GatewayProcessingUnit> |
getNames()
Returns a map of
GatewayProcessingUnit keyed by their respective names. |
GatewaySink |
getSink(String sourceGatewayName)
Returns a gateway sink which has a source gateway with the given name.
|
GatewaySinkSource |
getSinkSource(String sourceGatewayName)
Returns a sink source gateway with the given name.
|
int |
getSize()
Returns the number of deployed
GatewayProcessingUnit which are part of this gateway. |
boolean |
isEmpty()
Returns
true if there are no deployed GatewayProcessingUnit which are
part of this gateway; false |
Iterator<GatewayProcessingUnit> |
iterator() |
boolean |
waitFor(int numberOfGatewayProcessingUnits)
Waits for the default timeout specified by
Admin.setDefaultTimeout(long, TimeUnit)
till at least the provided number of Gateway Processing Unit Instances are up. |
boolean |
waitFor(int numberOfGatewayProcessingUnits,
long timeout,
TimeUnit timeUnit)
Waits for the specified timeout (in time interval) till at least the provided number of
Gateway Processing Unit Instances are up.
|
GatewayDelegator |
waitForDelegator(String targetGatewayName)
Waits for the default timeout specified by
Admin.setDefaultTimeout(long, TimeUnit)
till the gateway delegator with the given target gateway name is identified as deployed. |
GatewayDelegator |
waitForDelegator(String targetGatewayName,
long timeout,
TimeUnit timeUnit)
Waits for the specified timeout (in time interval) till the gateway delegator with the given
target gateway name is identified as deployed.
|
GatewayProcessingUnit |
waitForGatewayProcessingUnit(String processingUnitName)
Waits for the default timeout specified by
Admin.setDefaultTimeout(long, TimeUnit)
till the processing unit of this gateway is identified as deployed. |
GatewayProcessingUnit |
waitForGatewayProcessingUnit(String processingUnitName,
long timeout,
TimeUnit timeUnit)
Waits for the specified timeout (in time interval) till the processing unit of this gateway
is identified as deployed.
|
GatewaySink |
waitForSink(String sourceGatewayName)
Waits for the default timeout specified by
Admin.setDefaultTimeout(long, TimeUnit)
till the gateway sink with the given source gateway name is identified as deployed. |
GatewaySink |
waitForSink(String sourceGatewayName,
long timeout,
TimeUnit timeUnit)
Waits for the specified timeout (in time interval) till the gateway sink with the given
source gateway name is identified as deployed.
|
GatewaySinkSource |
waitForSinkSource(String sourceGatewayName)
Waits for the default timeout specified by
Admin.setDefaultTimeout(long, TimeUnit)
till the gateway sink with the given source gateway name is identified as deployed. |
GatewaySinkSource |
waitForSinkSource(String sourceGatewayName,
long timeout,
TimeUnit timeUnit)
Waits for the specified timeout (in time interval) till the gateway sink with the given
source gateway name is identified as deployed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public DefaultGateway(InternalAdmin admin, String gatewayName)
public Iterator<GatewayProcessingUnit> iterator()
iterator
in interface Iterable<GatewayProcessingUnit>
public GatewayProcessingUnit[] getGatewayProcessingUnits()
Gateway
GatewayProcessingUnit
s.getGatewayProcessingUnits
in interface Gateway
public String getName()
Gateway
public boolean waitFor(int numberOfGatewayProcessingUnits)
Gateway
Admin.setDefaultTimeout(long, TimeUnit)
till at least the provided number of Gateway Processing Unit Instances are up. Returns
true
if the specified number of gateway processing units are deployed,
false
otherwise;public boolean waitFor(int numberOfGatewayProcessingUnits, long timeout, TimeUnit timeUnit)
Gateway
true
if the specified number
of gateway processing units are deployed within the specified timeout, false
otherwise;public GatewayProcessingUnit waitForGatewayProcessingUnit(String processingUnitName)
Gateway
Admin.setDefaultTimeout(long, TimeUnit)
till the processing unit of this gateway is identified as deployed. Return null
if the processing unit is not deployed within the specified timeout.waitForGatewayProcessingUnit
in interface Gateway
public GatewayProcessingUnit waitForGatewayProcessingUnit(String processingUnitName, long timeout, TimeUnit timeUnit)
Gateway
null
if the processing unit is not deployed
within the specified timeout.waitForGatewayProcessingUnit
in interface Gateway
public GatewayProcessingUnit getGatewayProcessingUnit(String processingUnitName)
Gateway
null
if the gateway processing unit is not currently discovered.getGatewayProcessingUnit
in interface Gateway
public Map<String,GatewayProcessingUnit> getNames()
Gateway
GatewayProcessingUnit
keyed by their respective names.public GatewaySink getSink(String sourceGatewayName)
Gateway
null
if the gateway sink is not currently discovered or this gateway has no sink
with source gateway with the given name.public GatewaySink waitForSink(String sourceGatewayName)
Gateway
Admin.setDefaultTimeout(long, TimeUnit)
till the gateway sink with the given source gateway name is identified as deployed. Return
null
if the sink is not deployed within the specified timeout.waitForSink
in interface Gateway
public GatewaySink waitForSink(String sourceGatewayName, long timeout, TimeUnit timeUnit)
Gateway
null
if the sink is not
deployed within the specified timeout.waitForSink
in interface Gateway
public GatewaySinkSource getSinkSource(String sourceGatewayName)
Gateway
null
if the sink
source is not currently discovered or this gateway has no sink with source gateway with the
given name.getSinkSource
in interface Gateway
public GatewaySinkSource waitForSinkSource(String sourceGatewayName)
Gateway
Admin.setDefaultTimeout(long, TimeUnit)
till the gateway sink with the given source gateway name is identified as deployed. Returns
null
if the sink source is not deployed within the specified timeout.waitForSinkSource
in interface Gateway
public GatewaySinkSource waitForSinkSource(String sourceGatewayName, long timeout, TimeUnit timeUnit)
Gateway
null
if the sink source
is not deployed within the specified timeout.waitForSinkSource
in interface Gateway
public GatewayDelegator getDelegator(String targetGatewayName)
Gateway
null
if the gateway delegator is not currently discovered or this gateway has no
target with target gateway with the given name.getDelegator
in interface Gateway
public GatewayDelegator waitForDelegator(String targetGatewayName)
Gateway
Admin.setDefaultTimeout(long, TimeUnit)
till the gateway delegator with the given target gateway name is identified as deployed.
Returns null
if the delegator target is not deployed within the specified
timeout.waitForDelegator
in interface Gateway
public GatewayDelegator waitForDelegator(String targetGatewayName, long timeout, TimeUnit timeUnit)
Gateway
null
if the delegator
target is not deployed within the specified timeout.waitForDelegator
in interface Gateway
public int getSize()
Gateway
GatewayProcessingUnit
which are part of this gateway.public boolean isEmpty()
Gateway
true
if there are no deployed GatewayProcessingUnit
which are
part of this gateway; false otherwise.
Copyright © GigaSpaces.