Class Etcd3RoutePolicy

java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.RoutePolicySupport
org.apache.camel.component.etcd3.policy.Etcd3RoutePolicy
All Implemented Interfaces:
AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasCamelContext, org.apache.camel.spi.RoutePolicy, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

@ManagedResource(description="Route policy using Etcd as clustered lock") @Deprecated(since="4.9.0", forRemoval=true) public class Etcd3RoutePolicy extends org.apache.camel.support.RoutePolicySupport implements org.apache.camel.CamelContextAware
Deprecated, for removal: This API element is subject to removal in a future version.
An implementation of a route policy based on etcd.
  • Field Summary

    Fields inherited from class org.apache.camel.support.service.BaseService

    BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Etcd3RoutePolicy(io.etcd.jetcd.Client client)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Etcd3RoutePolicy(String... endpoints)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.apache.camel.CamelContext
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    io.etcd.jetcd.Client
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    onInit(org.apache.camel.Route route)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    onStart(org.apache.camel.Route route)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    onStop(org.apache.camel.Route route)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    onSuspend(org.apache.camel.Route route)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setCamelContext(org.apache.camel.CamelContext camelContext)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setEndpoints(String endpoints)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setEndpoints(String[] endpoints)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected void
    setLeader(boolean isLeader)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the latest leadership state of the current node and potentially triggers actions if the state has changed.
    void
    setServiceName(String serviceName)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setServicePath(String servicePath)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setShouldStopConsumer(boolean shouldStopConsumer)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setTimeout(int timeout)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setTtl(int ttl)
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class org.apache.camel.support.RoutePolicySupport

    controller, getExceptionHandler, handleException, onExchangeBegin, onExchangeDone, onRemove, onResume, resumeOrStartConsumer, resumeRoute, setExceptionHandler, startConsumer, startRoute, stopConsumer, stopRoute, stopRoute, stopRouteAsync, suspendOrStopConsumer, suspendRoute, suspendRoute

    Methods inherited from class org.apache.camel.support.service.BaseService

    build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.camel.Service

    build, close, init, start, stop

    Methods inherited from interface org.apache.camel.ShutdownableService

    shutdown

    Methods inherited from interface org.apache.camel.StatefulService

    getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending

    Methods inherited from interface org.apache.camel.SuspendableService

    isSuspended, resume, suspend
  • Constructor Details

    • Etcd3RoutePolicy

      public Etcd3RoutePolicy()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • Etcd3RoutePolicy

      public Etcd3RoutePolicy(Etcd3Configuration configuration)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • Etcd3RoutePolicy

      public Etcd3RoutePolicy(io.etcd.jetcd.Client client)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • Etcd3RoutePolicy

      public Etcd3RoutePolicy(String... endpoints)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • onInit

      public void onInit(org.apache.camel.Route route)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      onInit in interface org.apache.camel.spi.RoutePolicy
      Overrides:
      onInit in class org.apache.camel.support.RoutePolicySupport
    • onStart

      public void onStart(org.apache.camel.Route route)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      onStart in interface org.apache.camel.spi.RoutePolicy
      Overrides:
      onStart in class org.apache.camel.support.RoutePolicySupport
    • onStop

      public void onStop(org.apache.camel.Route route)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      onStop in interface org.apache.camel.spi.RoutePolicy
      Overrides:
      onStop in class org.apache.camel.support.RoutePolicySupport
    • onSuspend

      public void onSuspend(org.apache.camel.Route route)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      onSuspend in interface org.apache.camel.spi.RoutePolicy
      Overrides:
      onSuspend in class org.apache.camel.support.RoutePolicySupport
    • doStart

      protected void doStart() throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      doStart in class org.apache.camel.support.service.BaseService
      Throws:
      Exception
    • doStop

      protected void doStop() throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      doStop in class org.apache.camel.support.service.BaseService
      Throws:
      Exception
    • getCamelContext

      public org.apache.camel.CamelContext getCamelContext()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getCamelContext in interface org.apache.camel.spi.HasCamelContext
    • setCamelContext

      public void setCamelContext(org.apache.camel.CamelContext camelContext)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      setCamelContext in interface org.apache.camel.CamelContextAware
    • setLeader

      protected void setLeader(boolean isLeader)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the latest leadership state of the current node and potentially triggers actions if the state has changed.
      Parameters:
      isLeader - true if the current node is the leader, false otherwise.
    • getClient

      public io.etcd.jetcd.Client getClient()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getRouteId

      @ManagedAttribute(description="The route id") public String getRouteId()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getEndpointUrl

      @ManagedAttribute(description="The consumer endpoint", mask=true) public String getEndpointUrl()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getServiceName

      public String getServiceName()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setServiceName

      @ManagedAttribute(description="The etcd service name") public void setServiceName(String serviceName)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getServicePath

      @ManagedAttribute(description="The etcd service path") public String getServicePath()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setServicePath

      public void setServicePath(String servicePath)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getTtl

      @ManagedAttribute(description="The time to live (seconds)") public int getTtl()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setTtl

      public void setTtl(int ttl)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getTimeout

      @ManagedAttribute(description="The request timeout (seconds)") public int getTimeout()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setTimeout

      public void setTimeout(int timeout)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • isShouldStopConsumer

      @ManagedAttribute(description="Whether to stop consumer when starting up and failed to become master") public boolean isShouldStopConsumer()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setShouldStopConsumer

      public void setShouldStopConsumer(boolean shouldStopConsumer)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • isLeader

      @ManagedAttribute(description="Is this route the master or a slave") public boolean isLeader()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getEndpoints

      @ManagedAttribute(description="Etcd endpoints") public String getEndpoints()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setEndpoints

      public void setEndpoints(String[] endpoints)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setEndpoints

      public void setEndpoints(String endpoints)
      Deprecated, for removal: This API element is subject to removal in a future version.