Class DefaultGateway

java.lang.Object
org.openspaces.admin.internal.gateway.DefaultGateway
All Implemented Interfaces:
Iterable<GatewayProcessingUnit>, Gateway

public class DefaultGateway extends Object implements Gateway
Since:
8.0.4
Author:
eitany
  • Constructor Details

  • Method Details

    • iterator

      public Iterator<GatewayProcessingUnit> iterator()
      Specified by:
      iterator in interface Iterable<GatewayProcessingUnit>
    • getGatewayProcessingUnits

      public GatewayProcessingUnit[] getGatewayProcessingUnits()
      Description copied from interface: Gateway
      Returns all the currently deployed GatewayProcessingUnits.
      Specified by:
      getGatewayProcessingUnits in interface Gateway
    • getName

      public String getName()
      Description copied from interface: Gateway
      Returns the name which is used by the other gateways to locate this gateway.
      Specified by:
      getName in interface Gateway
    • waitFor

      public boolean waitFor(int numberOfGatewayProcessingUnits)
      Description copied from interface: Gateway
      Waits for the default timeout specified by 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;
      Specified by:
      waitFor in interface Gateway
    • waitFor

      public boolean waitFor(int numberOfGatewayProcessingUnits, long timeout, TimeUnit timeUnit)
      Description copied from interface: Gateway
      Waits for the specified timeout (in time interval) 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 within the specified timeout, false otherwise;
      Specified by:
      waitFor in interface Gateway
    • waitForGatewayProcessingUnit

      public GatewayProcessingUnit waitForGatewayProcessingUnit(String processingUnitName)
      Description copied from interface: Gateway
      Waits for the default timeout specified by 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.
      Specified by:
      waitForGatewayProcessingUnit in interface Gateway
    • waitForGatewayProcessingUnit

      public GatewayProcessingUnit waitForGatewayProcessingUnit(String processingUnitName, long timeout, TimeUnit timeUnit)
      Description copied from interface: Gateway
      Waits for the specified timeout (in time interval) till the processing unit of this gateway is identified as deployed. Return null if the processing unit is not deployed within the specified timeout.
      Specified by:
      waitForGatewayProcessingUnit in interface Gateway
    • getGatewayProcessingUnit

      public GatewayProcessingUnit getGatewayProcessingUnit(String processingUnitName)
      Description copied from interface: Gateway
      Returns the gateway processing unit for the given processing unit name. Returns null if the gateway processing unit is not currently discovered.
      Specified by:
      getGatewayProcessingUnit in interface Gateway
    • getNames

      public Map<String,GatewayProcessingUnit> getNames()
      Description copied from interface: Gateway
      Returns a map of GatewayProcessingUnit keyed by their respective names.
      Specified by:
      getNames in interface Gateway
    • getSink

      public GatewaySink getSink(String sourceGatewayName)
      Description copied from interface: Gateway
      Returns a gateway sink which has a source gateway with the given name. Returns null if the gateway sink is not currently discovered or this gateway has no sink with source gateway with the given name.
      Specified by:
      getSink in interface Gateway
    • waitForSink

      public GatewaySink waitForSink(String sourceGatewayName)
      Description copied from interface: Gateway
      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. Return null if the sink is not deployed within the specified timeout.
      Specified by:
      waitForSink in interface Gateway
    • waitForSink

      public GatewaySink waitForSink(String sourceGatewayName, long timeout, TimeUnit timeUnit)
      Description copied from interface: Gateway
      Waits for the specified timeout (in time interval) 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.
      Specified by:
      waitForSink in interface Gateway
    • getSinkSource

      public GatewaySinkSource getSinkSource(String sourceGatewayName)
      Description copied from interface: Gateway
      Returns a sink source gateway with the given name. Returns null if the sink source is not currently discovered or this gateway has no sink with source gateway with the given name.
      Specified by:
      getSinkSource in interface Gateway
    • waitForSinkSource

      public GatewaySinkSource waitForSinkSource(String sourceGatewayName)
      Description copied from interface: Gateway
      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. Returns null if the sink source is not deployed within the specified timeout.
      Specified by:
      waitForSinkSource in interface Gateway
    • waitForSinkSource

      public GatewaySinkSource waitForSinkSource(String sourceGatewayName, long timeout, TimeUnit timeUnit)
      Description copied from interface: Gateway
      Waits for the specified timeout (in time interval) 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.
      Specified by:
      waitForSinkSource in interface Gateway
    • getDelegator

      public GatewayDelegator getDelegator(String targetGatewayName)
      Description copied from interface: Gateway
      Returns a gateway delegator which has a target gateway with the given name. Returns null if the gateway delegator is not currently discovered or this gateway has no target with target gateway with the given name.
      Specified by:
      getDelegator in interface Gateway
    • waitForDelegator

      public GatewayDelegator waitForDelegator(String targetGatewayName)
      Description copied from interface: Gateway
      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. Returns null if the delegator target is not deployed within the specified timeout.
      Specified by:
      waitForDelegator in interface Gateway
    • waitForDelegator

      public GatewayDelegator waitForDelegator(String targetGatewayName, long timeout, TimeUnit timeUnit)
      Description copied from interface: Gateway
      Waits for the specified timeout (in time interval) 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.
      Specified by:
      waitForDelegator in interface Gateway
    • getSize

      public int getSize()
      Description copied from interface: Gateway
      Returns the number of deployed GatewayProcessingUnit which are part of this gateway.
      Specified by:
      getSize in interface Gateway
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: Gateway
      Returns true if there are no deployed GatewayProcessingUnit which are part of this gateway; false otherwise.
      Specified by:
      isEmpty in interface Gateway