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
GatewayProcessingUnits. |
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, waitforEach, spliteratorpublic DefaultGateway(InternalAdmin admin, String gatewayName)
public Iterator<GatewayProcessingUnit> iterator()
iterator in interface Iterable<GatewayProcessingUnit>public GatewayProcessingUnit[] getGatewayProcessingUnits()
GatewayGatewayProcessingUnits.getGatewayProcessingUnits in interface Gatewaypublic String getName()
Gatewaypublic boolean waitFor(int numberOfGatewayProcessingUnits)
GatewayAdmin.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)
Gatewaytrue if the specified number
of gateway processing units are deployed within the specified timeout, false
otherwise;public GatewayProcessingUnit waitForGatewayProcessingUnit(String processingUnitName)
GatewayAdmin.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 Gatewaypublic GatewayProcessingUnit waitForGatewayProcessingUnit(String processingUnitName, long timeout, TimeUnit timeUnit)
Gatewaynull if the processing unit is not deployed
within the specified timeout.waitForGatewayProcessingUnit in interface Gatewaypublic GatewayProcessingUnit getGatewayProcessingUnit(String processingUnitName)
Gatewaynull if the gateway processing unit is not currently discovered.getGatewayProcessingUnit in interface Gatewaypublic Map<String,GatewayProcessingUnit> getNames()
GatewayGatewayProcessingUnit keyed by their respective names.public GatewaySink getSink(String sourceGatewayName)
Gatewaynull 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)
GatewayAdmin.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 Gatewaypublic GatewaySink waitForSink(String sourceGatewayName, long timeout, TimeUnit timeUnit)
Gatewaynull if the sink is not
deployed within the specified timeout.waitForSink in interface Gatewaypublic GatewaySinkSource getSinkSource(String sourceGatewayName)
Gatewaynull if the sink
source is not currently discovered or this gateway has no sink with source gateway with the
given name.getSinkSource in interface Gatewaypublic GatewaySinkSource waitForSinkSource(String sourceGatewayName)
GatewayAdmin.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 Gatewaypublic GatewaySinkSource waitForSinkSource(String sourceGatewayName, long timeout, TimeUnit timeUnit)
Gatewaynull if the sink source
is not deployed within the specified timeout.waitForSinkSource in interface Gatewaypublic GatewayDelegator getDelegator(String targetGatewayName)
Gatewaynull if the gateway delegator is not currently discovered or this gateway has no
target with target gateway with the given name.getDelegator in interface Gatewaypublic GatewayDelegator waitForDelegator(String targetGatewayName)
GatewayAdmin.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 Gatewaypublic GatewayDelegator waitForDelegator(String targetGatewayName, long timeout, TimeUnit timeUnit)
Gatewaynull if the delegator
target is not deployed within the specified timeout.waitForDelegator in interface Gatewaypublic int getSize()
GatewayGatewayProcessingUnit which are part of this gateway.public boolean isEmpty()
Gatewaytrue if there are no deployed GatewayProcessingUnit which are
part of this gateway; false otherwise.Copyright © GigaSpaces.