public class org.apache.camel.processor.Throttler extends org.apache.camel.processor.DelegateAsyncProcessor implements org.apache.camel.Traceable, org.apache.camel.spi.IdAware
{
private static final java.lang.String DEFAULT_KEY;
private static final java.lang.String PROPERTY_EXCHANGE_QUEUED_TIMESTAMP;
private static final java.lang.String PROPERTY_EXCHANGE_STATE;
private final org.slf4j.Logger log;
private final org.apache.camel.CamelContext camelContext;
private final java.util.concurrent.ScheduledExecutorService asyncExecutor;
private final boolean shutdownAsyncExecutor;
private volatile long timePeriodMillis;
private volatile long cleanPeriodMillis;
private java.lang.String id;
private org.apache.camel.Expression maxRequestsPerPeriodExpression;
private boolean rejectExecution;
private boolean asyncDelayed;
private boolean callerRunsWhenRejected;
private org.apache.camel.Expression correlationExpression;
private java.util.Map states;
public void <init>(org.apache.camel.CamelContext, org.apache.camel.Processor, org.apache.camel.Expression, long, java.util.concurrent.ScheduledExecutorService, boolean, boolean, org.apache.camel.Expression)
{
org.apache.camel.CamelContext v;
org.slf4j.Logger v;
java.util.concurrent.ConcurrentHashMap v;
long v, v;
java.lang.IllegalArgumentException v;
org.apache.camel.Expression v, v;
org.apache.camel.Processor v;
byte v;
org.apache.camel.processor.Throttler v;
java.util.concurrent.ScheduledExecutorService v;
java.lang.String v;
boolean v, v;
v := @this: org.apache.camel.processor.Throttler;
v := @parameter: org.apache.camel.CamelContext;
v := @parameter: org.apache.camel.Processor;
v := @parameter: org.apache.camel.Expression;
v := @parameter: long;
v := @parameter: java.util.concurrent.ScheduledExecutorService;
v := @parameter: boolean;
v := @parameter: boolean;
v := @parameter: org.apache.camel.Expression;
specialinvoke v.<org.apache.camel.processor.DelegateAsyncProcessor: void <init>(org.apache.camel.Processor)>(v);
v = staticinvoke <org.slf4j.LoggerFactory: org.slf4j.Logger getLogger(java.lang.Class)>(class "Lorg/apache/camel/processor/Throttler;");
v.<org.apache.camel.processor.Throttler: org.slf4j.Logger log> = v;
v.<org.apache.camel.processor.Throttler: boolean callerRunsWhenRejected> = 1;
v = new java.util.concurrent.ConcurrentHashMap;
specialinvoke v.<java.util.concurrent.ConcurrentHashMap: void <init>()>();
v.<org.apache.camel.processor.Throttler: java.util.Map states> = v;
v.<org.apache.camel.processor.Throttler: org.apache.camel.CamelContext camelContext> = v;
v.<org.apache.camel.processor.Throttler: boolean rejectExecution> = v;
v.<org.apache.camel.processor.Throttler: boolean shutdownAsyncExecutor> = v;
staticinvoke <org.apache.camel.util.ObjectHelper: java.lang.Object notNull(java.lang.Object,java.lang.String)>(v, "maxRequestsPerPeriodExpression");
v.<org.apache.camel.processor.Throttler: org.apache.camel.Expression maxRequestsPerPeriodExpression> = v;
v = v cmp 0L;
if v > 0 goto label;
v = new java.lang.IllegalArgumentException;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (long)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("TimePeriodMillis should be a positive number, was: \u0001");
specialinvoke v.<java.lang.IllegalArgumentException: void <init>(java.lang.String)>(v);
throw v;
label:
v.<org.apache.camel.processor.Throttler: long timePeriodMillis> = v;
v = v * 10L;
v.<org.apache.camel.processor.Throttler: long cleanPeriodMillis> = v;
v.<org.apache.camel.processor.Throttler: java.util.concurrent.ScheduledExecutorService asyncExecutor> = v;
v.<org.apache.camel.processor.Throttler: org.apache.camel.Expression correlationExpression> = v;
return;
}
public boolean process(org.apache.camel.Exchange, org.apache.camel.AsyncCallback)
{
java.lang.Long v, v, v, v, v;
org.apache.camel.processor.Throttler$State v, v, v, v, v, v;
java.util.Map v;
org.apache.camel.processor.Throttler$ThrottlePermit v, v;
org.apache.camel.processor.Throttler v;
java.lang.Throwable v;
java.lang.Object[] v;
long v, v, v, v, v, v, v, v;
java.lang.String v, v, v, v, v, v, v;
org.apache.camel.AsyncCallback v;
boolean v, v, v, v, v, v, v, v, v, v, v, v, v, v;
org.apache.camel.spi.ShutdownStrategy v;
org.apache.camel.AsyncProcessor v, v, v;
org.apache.camel.Exchange v;
java.util.function.Function v;
org.apache.camel.Expression v, v;
java.util.concurrent.RejectedExecutionException v, v;
int v;
org.apache.camel.CamelContext v;
org.slf4j.Logger v, v, v, v, v, v, v, v, v, v, v;
java.lang.InterruptedException v;
org.apache.camel.processor.ThrottlerRejectedExecutionException v;
java.lang.Object v, v, v, v;
v := @this: org.apache.camel.processor.Throttler;
v := @parameter: org.apache.camel.Exchange;
v := @parameter: org.apache.camel.AsyncCallback;
v = 0L;
v = v.<org.apache.camel.processor.Throttler: org.slf4j.Logger log>;
v = interfaceinvoke v.<org.slf4j.Logger: boolean isTraceEnabled()>();
if v == 0 goto label;
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(0L);
v = interfaceinvoke v.<org.apache.camel.Exchange: java.lang.Object getProperty(java.lang.String,java.lang.Object,java.lang.Class)>("CamelThrottlerExchangeQueuedTimestamp", v, class "Ljava/lang/Long;");
v = virtualinvoke v.<java.lang.Long: long longValue()>();
interfaceinvoke v.<org.apache.camel.Exchange: java.lang.Object removeProperty(java.lang.String)>("CamelThrottlerExchangeQueuedTimestamp");
label:
v = <org.apache.camel.processor.Throttler$State: org.apache.camel.processor.Throttler$State SYNC>;
v = interfaceinvoke v.<org.apache.camel.Exchange: java.lang.Object getProperty(java.lang.String,java.lang.Object,java.lang.Class)>("CamelThrottlerExchangeState", v, class "Lorg/apache/camel/processor/Throttler$State;");
interfaceinvoke v.<org.apache.camel.Exchange: java.lang.Object removeProperty(java.lang.String)>("CamelThrottlerExchangeState");
v = <org.apache.camel.processor.Throttler$State: org.apache.camel.processor.Throttler$State SYNC>;
if v == v goto label;
v = <org.apache.camel.processor.Throttler$State: org.apache.camel.processor.Throttler$State ASYNC_REJECTED>;
if v != v goto label;
label:
v = 1;
goto label;
label:
v = 0;
label:
v = v;
label:
v = virtualinvoke v.<org.apache.camel.processor.Throttler: boolean isRunAllowed()>();
if v != 0 goto label;
v = new java.util.concurrent.RejectedExecutionException;
specialinvoke v.<java.util.concurrent.RejectedExecutionException: void <init>(java.lang.String)>("Run is not allowed");
throw v;
label:
v = v.<org.apache.camel.processor.Throttler: org.apache.camel.Expression correlationExpression>;
if v == null goto label;
v = v.<org.apache.camel.processor.Throttler: org.apache.camel.Expression correlationExpression>;
v = interfaceinvoke v.<org.apache.camel.Expression: java.lang.Object evaluate(org.apache.camel.Exchange,java.lang.Class)>(v, class "Ljava/lang/String;");
label:
v = v.<org.apache.camel.processor.Throttler: java.util.Map states>;
v = staticinvoke <org.apache.camel.processor.Throttler$lambda_process_0__486: java.util.function.Function bootstrap$(org.apache.camel.processor.Throttler)>(v);
v = interfaceinvoke v.<java.util.Map: java.lang.Object computeIfAbsent(java.lang.Object,java.util.function.Function)>(v, v);
virtualinvoke v.<org.apache.camel.processor.Throttler$ThrottlingState: void calculateAndSetMaxRequestsPerPeriod(org.apache.camel.Exchange)>(v);
v = virtualinvoke v.<org.apache.camel.processor.Throttler$ThrottlingState: org.apache.camel.processor.Throttler$ThrottlePermit poll()>();
if v != null goto label;
v = virtualinvoke v.<org.apache.camel.processor.Throttler: boolean isRejectExecution()>();
if v == 0 goto label;
v = new org.apache.camel.processor.ThrottlerRejectedExecutionException;
v = virtualinvoke v.<org.apache.camel.processor.Throttler$ThrottlingState: int getThrottleRate()>();
v = v.<org.apache.camel.processor.Throttler: long timePeriodMillis>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (int,long)>(v, v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("Exceeded the max throttle rate of \u within \u0001ms");
specialinvoke v.<org.apache.camel.processor.ThrottlerRejectedExecutionException: void <init>(java.lang.String)>(v);
throw v;
label:
v = virtualinvoke v.<org.apache.camel.processor.Throttler: boolean isAsyncDelayed()>();
if v == 0 goto label;
v = interfaceinvoke v.<org.apache.camel.Exchange: boolean isTransacted()>();
if v != 0 goto label;
v = <org.apache.camel.processor.Throttler$State: org.apache.camel.processor.Throttler$State SYNC>;
if v != v goto label;
v = v.<org.apache.camel.processor.Throttler: org.slf4j.Logger log>;
v = interfaceinvoke v.<org.apache.camel.Exchange: java.lang.String getExchangeId()>();
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String,java.lang.Object)>("Throttle rate exceeded but AsyncDelayed enabled, so queueing for async processing, exchangeId: {}", v);
v = virtualinvoke v.<org.apache.camel.processor.Throttler: boolean processAsynchronously(org.apache.camel.Exchange,org.apache.camel.AsyncCallback,org.apache.camel.processor.Throttler$ThrottlingState)>(v, v, v);
label:
return v;
label:
v = 0L;
v = 0L;
v = v.<org.apache.camel.processor.Throttler: org.slf4j.Logger log>;
v = interfaceinvoke v.<org.slf4j.Logger: boolean isTraceEnabled()>();
if v == 0 goto label;
v = staticinvoke <java.lang.System: long currentTimeMillis()>();
label:
v = virtualinvoke v.<org.apache.camel.processor.Throttler$ThrottlingState: org.apache.camel.processor.Throttler$ThrottlePermit take()>();
v = v.<org.apache.camel.processor.Throttler: org.slf4j.Logger log>;
v = interfaceinvoke v.<org.slf4j.Logger: boolean isTraceEnabled()>();
if v == 0 goto label;
v = staticinvoke <java.lang.System: long currentTimeMillis()>();
v = v - v;
label:
virtualinvoke v.<org.apache.camel.processor.Throttler$ThrottlingState: void enqueue(org.apache.camel.processor.Throttler$ThrottlePermit,org.apache.camel.Exchange)>(v, v);
v = <org.apache.camel.processor.Throttler$State: org.apache.camel.processor.Throttler$State ASYNC>;
if v != v goto label;
v = v.<org.apache.camel.processor.Throttler: org.slf4j.Logger log>;
v = interfaceinvoke v.<org.slf4j.Logger: boolean isTraceEnabled()>();
if v == 0 goto label;
v = v - v;
v = v.<org.apache.camel.processor.Throttler: org.slf4j.Logger log>;
v = newarray (java.lang.Object)[3];
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
v[0] = v;
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
v[1] = v;
v = interfaceinvoke v.<org.apache.camel.Exchange: java.lang.String getExchangeId()>();
v[2] = v;
interfaceinvoke v.<org.slf4j.Logger: void trace(java.lang.String,java.lang.Object[])>("Queued for {}ms, Throttled for {}ms, exchangeId: {}", v);
goto label;
label:
v = v.<org.apache.camel.processor.Throttler: org.slf4j.Logger log>;
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
v = interfaceinvoke v.<org.apache.camel.Exchange: java.lang.String getExchangeId()>();
interfaceinvoke v.<org.slf4j.Logger: void trace(java.lang.String,java.lang.Object,java.lang.Object)>("Throttled for {}ms, exchangeId: {}", v, v);
goto label;
label:
virtualinvoke v.<org.apache.camel.processor.Throttler$ThrottlingState: void enqueue(org.apache.camel.processor.Throttler$ThrottlePermit,org.apache.camel.Exchange)>(v, v);
v = <org.apache.camel.processor.Throttler$State: org.apache.camel.processor.Throttler$State ASYNC>;
if v != v goto label;
v = v.<org.apache.camel.processor.Throttler: org.slf4j.Logger log>;
v = interfaceinvoke v.<org.slf4j.Logger: boolean isTraceEnabled()>();
if v == 0 goto label;
v = staticinvoke <java.lang.System: long currentTimeMillis()>();
v = v - v;
v = v.<org.apache.camel.processor.Throttler: org.slf4j.Logger log>;
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
v = interfaceinvoke v.<org.apache.camel.Exchange: java.lang.String getExchangeId()>();
interfaceinvoke v.<org.slf4j.Logger: void trace(java.lang.String,java.lang.Object,java.lang.Object)>("Queued for {}ms, No throttling applied (throttle cleared while queued), for exchangeId: {}", v, v);
goto label;
label:
v = v.<org.apache.camel.processor.Throttler: org.slf4j.Logger log>;
v = interfaceinvoke v.<org.apache.camel.Exchange: java.lang.String getExchangeId()>();
interfaceinvoke v.<org.slf4j.Logger: void trace(java.lang.String,java.lang.Object)>("No throttling applied to exchangeId: {}", v);
label:
v = v.<org.apache.camel.processor.Throttler: org.apache.camel.AsyncProcessor processor>;
if v == null goto label;
if v == 0 goto label;
v = v.<org.apache.camel.processor.Throttler: org.apache.camel.AsyncProcessor processor>;
v = interfaceinvoke v.<org.apache.camel.AsyncProcessor: boolean process(org.apache.camel.Exchange,org.apache.camel.AsyncCallback)>(v, v);
label:
return v;
label:
v = v.<org.apache.camel.processor.Throttler: org.apache.camel.AsyncProcessor processor>;
staticinvoke <org.apache.camel.util.AsyncProcessorHelper: void process(org.apache.camel.AsyncProcessor,org.apache.camel.Exchange)>(v, v);
label:
interfaceinvoke v.<org.apache.camel.AsyncCallback: void done(boolean)>(v);
label:
return v;
label:
v := @caughtexception;
v = interfaceinvoke v.<org.apache.camel.Exchange: org.apache.camel.CamelContext getContext()>();
v = interfaceinvoke v.<org.apache.camel.CamelContext: org.apache.camel.spi.ShutdownStrategy getShutdownStrategy()>();
v = interfaceinvoke v.<org.apache.camel.spi.ShutdownStrategy: boolean forceShutdown(org.apache.camel.Service)>(v);
if v == 0 goto label;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (org.apache.camel.Exchange)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("Run not allowed as ShutdownStrategy is forcing shutting down, will reject executing exchange: \u0001");
v = v.<org.apache.camel.processor.Throttler: org.slf4j.Logger log>;
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String)>(v);
v = new java.util.concurrent.RejectedExecutionException;
specialinvoke v.<java.util.concurrent.RejectedExecutionException: void <init>(java.lang.String,java.lang.Throwable)>(v, v);
interfaceinvoke v.<org.apache.camel.Exchange: void setException(java.lang.Throwable)>(v);
goto label;
label:
interfaceinvoke v.<org.apache.camel.Exchange: void setException(java.lang.Throwable)>(v);
label:
interfaceinvoke v.<org.apache.camel.AsyncCallback: void done(boolean)>(v);
return v;
label:
v := @caughtexception;
interfaceinvoke v.<org.apache.camel.Exchange: void setException(java.lang.Throwable)>(v);
interfaceinvoke v.<org.apache.camel.AsyncCallback: void done(boolean)>(v);
return v;
catch java.lang.InterruptedException from label to label with label;
catch java.lang.InterruptedException from label to label with label;
catch java.lang.InterruptedException from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
}
protected boolean processAsynchronously(org.apache.camel.Exchange, org.apache.camel.AsyncCallback, org.apache.camel.processor.Throttler$ThrottlingState)
{
org.apache.camel.processor.Throttler$ThrottlingState v;
java.util.concurrent.Callable v;
long v, v;
org.apache.camel.Exchange v;
java.util.concurrent.RejectedExecutionException v;
java.lang.Long v;
org.apache.camel.processor.Throttler$State v, v;
java.util.concurrent.ScheduledExecutorService v;
java.lang.String v;
boolean v, v, v;
org.slf4j.Logger v, v;
org.apache.camel.AsyncCallback v;
java.util.concurrent.TimeUnit v, v;
org.apache.camel.processor.Throttler$ThrottlePermit v;
org.apache.camel.processor.Throttler v;
v := @this: org.apache.camel.processor.Throttler;
v := @parameter: org.apache.camel.Exchange;
v := @parameter: org.apache.camel.AsyncCallback;
v := @parameter: org.apache.camel.processor.Throttler$ThrottlingState;
label:
v = v.<org.apache.camel.processor.Throttler: org.slf4j.Logger log>;
v = interfaceinvoke v.<org.slf4j.Logger: boolean isTraceEnabled()>();
if v == 0 goto label;
v = staticinvoke <java.lang.System: long currentTimeMillis()>();
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
interfaceinvoke v.<org.apache.camel.Exchange: void setProperty(java.lang.String,java.lang.Object)>("CamelThrottlerExchangeQueuedTimestamp", v);
label:
v = <org.apache.camel.processor.Throttler$State: org.apache.camel.processor.Throttler$State ASYNC>;
interfaceinvoke v.<org.apache.camel.Exchange: void setProperty(java.lang.String,java.lang.Object)>("CamelThrottlerExchangeState", v);
v = virtualinvoke v.<org.apache.camel.processor.Throttler$ThrottlingState: org.apache.camel.processor.Throttler$ThrottlePermit peek()>();
v = <java.util.concurrent.TimeUnit: java.util.concurrent.TimeUnit NANOSECONDS>;
v = virtualinvoke v.<org.apache.camel.processor.Throttler$ThrottlePermit: long getDelay(java.util.concurrent.TimeUnit)>(v);
v = v.<org.apache.camel.processor.Throttler: java.util.concurrent.ScheduledExecutorService asyncExecutor>;
v = staticinvoke <org.apache.camel.processor.Throttler$lambda_processAsynchronously_1__487: java.util.concurrent.Callable bootstrap$(org.apache.camel.processor.Throttler,org.apache.camel.Exchange,org.apache.camel.AsyncCallback)>(v, v, v);
v = <java.util.concurrent.TimeUnit: java.util.concurrent.TimeUnit NANOSECONDS>;
interfaceinvoke v.<java.util.concurrent.ScheduledExecutorService: java.util.concurrent.ScheduledFuture schedule(java.util.concurrent.Callable,long,java.util.concurrent.TimeUnit)>(v, v, v);
label:
return 0;
label:
v := @caughtexception;
v = virtualinvoke v.<org.apache.camel.processor.Throttler: boolean isCallerRunsWhenRejected()>();
if v == 0 goto label;
v = v.<org.apache.camel.processor.Throttler: org.slf4j.Logger log>;
v = interfaceinvoke v.<org.apache.camel.Exchange: java.lang.String getExchangeId()>();
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String,java.lang.Object)>("AsyncExecutor is full, rejected exchange will run in the current thread, exchangeId: {}", v);
v = <org.apache.camel.processor.Throttler$State: org.apache.camel.processor.Throttler$State ASYNC_REJECTED>;
interfaceinvoke v.<org.apache.camel.Exchange: void setProperty(java.lang.String,java.lang.Object)>("CamelThrottlerExchangeState", v);
v = virtualinvoke v.<org.apache.camel.processor.Throttler: boolean process(org.apache.camel.Exchange,org.apache.camel.AsyncCallback)>(v, v);
return v;
label:
throw v;
catch java.util.concurrent.RejectedExecutionException from label to label with label;
}
protected void doStart() throws java.lang.Exception
{
java.util.concurrent.ScheduledExecutorService v;
org.apache.camel.processor.Throttler v;
boolean v;
v := @this: org.apache.camel.processor.Throttler;
v = virtualinvoke v.<org.apache.camel.processor.Throttler: boolean isAsyncDelayed()>();
if v == 0 goto label;
v = v.<org.apache.camel.processor.Throttler: java.util.concurrent.ScheduledExecutorService asyncExecutor>;
staticinvoke <org.apache.camel.util.ObjectHelper: java.lang.Object notNull(java.lang.Object,java.lang.String,java.lang.Object)>(v, "executorService", v);
label:
specialinvoke v.<org.apache.camel.processor.DelegateAsyncProcessor: void doStart()>();
return;
}
protected void doShutdown() throws java.lang.Exception
{
org.apache.camel.CamelContext v;
org.apache.camel.processor.Throttler v;
java.util.Map v;
java.util.concurrent.ScheduledExecutorService v, v;
org.apache.camel.spi.ExecutorServiceManager v;
boolean v;
v := @this: org.apache.camel.processor.Throttler;
v = v.<org.apache.camel.processor.Throttler: boolean shutdownAsyncExecutor>;
if v == 0 goto label;
v = v.<org.apache.camel.processor.Throttler: java.util.concurrent.ScheduledExecutorService asyncExecutor>;
if v == null goto label;
v = v.<org.apache.camel.processor.Throttler: org.apache.camel.CamelContext camelContext>;
v = interfaceinvoke v.<org.apache.camel.CamelContext: org.apache.camel.spi.ExecutorServiceManager getExecutorServiceManager()>();
v = v.<org.apache.camel.processor.Throttler: java.util.concurrent.ScheduledExecutorService asyncExecutor>;
interfaceinvoke v.<org.apache.camel.spi.ExecutorServiceManager: java.util.List shutdownNow(java.util.concurrent.ExecutorService)>(v);
label:
v = v.<org.apache.camel.processor.Throttler: java.util.Map states>;
interfaceinvoke v.<java.util.Map: void clear()>();
specialinvoke v.<org.apache.camel.processor.DelegateAsyncProcessor: void doShutdown()>();
return;
}
public boolean isRejectExecution()
{
org.apache.camel.processor.Throttler v;
boolean v;
v := @this: org.apache.camel.processor.Throttler;
v = v.<org.apache.camel.processor.Throttler: boolean rejectExecution>;
return v;
}
public void setRejectExecution(boolean)
{
org.apache.camel.processor.Throttler v;
boolean v;
v := @this: org.apache.camel.processor.Throttler;
v := @parameter: boolean;
v.<org.apache.camel.processor.Throttler: boolean rejectExecution> = v;
return;
}
public boolean isAsyncDelayed()
{
org.apache.camel.processor.Throttler v;
boolean v;
v := @this: org.apache.camel.processor.Throttler;
v = v.<org.apache.camel.processor.Throttler: boolean asyncDelayed>;
return v;
}
public void setAsyncDelayed(boolean)
{
org.apache.camel.processor.Throttler v;
boolean v;
v := @this: org.apache.camel.processor.Throttler;
v := @parameter: boolean;
v.<org.apache.camel.processor.Throttler: boolean asyncDelayed> = v;
return;
}
public boolean isCallerRunsWhenRejected()
{
org.apache.camel.processor.Throttler v;
boolean v;
v := @this: org.apache.camel.processor.Throttler;
v = v.<org.apache.camel.processor.Throttler: boolean callerRunsWhenRejected>;
return v;
}
public void setCallerRunsWhenRejected(boolean)
{
org.apache.camel.processor.Throttler v;
boolean v;
v := @this: org.apache.camel.processor.Throttler;
v := @parameter: boolean;
v.<org.apache.camel.processor.Throttler: boolean callerRunsWhenRejected> = v;
return;
}
public java.lang.String getId()
{
java.lang.String v;
org.apache.camel.processor.Throttler v;
v := @this: org.apache.camel.processor.Throttler;
v = v.<org.apache.camel.processor.Throttler: java.lang.String id>;
return v;
}
public void setId(java.lang.String)
{
java.lang.String v;
org.apache.camel.processor.Throttler v;
v := @this: org.apache.camel.processor.Throttler;
v := @parameter: java.lang.String;
v.<org.apache.camel.processor.Throttler: java.lang.String id> = v;
return;
}
public void setMaximumRequestsPerPeriodExpression(org.apache.camel.Expression)
{
org.apache.camel.processor.Throttler v;
org.apache.camel.Expression v;
v := @this: org.apache.camel.processor.Throttler;
v := @parameter: org.apache.camel.Expression;
v.<org.apache.camel.processor.Throttler: org.apache.camel.Expression maxRequestsPerPeriodExpression> = v;
return;
}
public org.apache.camel.Expression getMaximumRequestsPerPeriodExpression()
{
org.apache.camel.processor.Throttler v;
org.apache.camel.Expression v;
v := @this: org.apache.camel.processor.Throttler;
v = v.<org.apache.camel.processor.Throttler: org.apache.camel.Expression maxRequestsPerPeriodExpression>;
return v;
}
public int getCurrentMaximumRequestsPerPeriod()
{
java.util.stream.IntStream v;
java.util.Collection v;
java.util.function.ToIntFunction v;
java.util.OptionalInt v;
java.util.stream.Stream v;
org.apache.camel.processor.Throttler v;
java.util.Map v;
int v;
v := @this: org.apache.camel.processor.Throttler;
v = v.<org.apache.camel.processor.Throttler: java.util.Map states>;
v = interfaceinvoke v.<java.util.Map: java.util.Collection values()>();
v = interfaceinvoke v.<java.util.Collection: java.util.stream.Stream stream()>();
v = staticinvoke <org.apache.camel.processor.Throttler$getThrottleRate__488: java.util.function.ToIntFunction bootstrap$()>();
v = interfaceinvoke v.<java.util.stream.Stream: java.util.stream.IntStream mapToInt(java.util.function.ToIntFunction)>(v);
v = interfaceinvoke v.<java.util.stream.IntStream: java.util.OptionalInt max()>();
v = virtualinvoke v.<java.util.OptionalInt: int orElse(int)>(0);
return v;
}
public void setTimePeriodMillis(long)
{
long v;
org.apache.camel.processor.Throttler v;
v := @this: org.apache.camel.processor.Throttler;
v := @parameter: long;
v.<org.apache.camel.processor.Throttler: long timePeriodMillis> = v;
return;
}
public long getTimePeriodMillis()
{
long v;
org.apache.camel.processor.Throttler v;
v := @this: org.apache.camel.processor.Throttler;
v = v.<org.apache.camel.processor.Throttler: long timePeriodMillis>;
return v;
}
public java.lang.String getTraceLabel()
{
org.apache.camel.processor.Throttler v;
long v;
java.lang.String v;
org.apache.camel.Expression v;
v := @this: org.apache.camel.processor.Throttler;
v = v.<org.apache.camel.processor.Throttler: org.apache.camel.Expression maxRequestsPerPeriodExpression>;
v = v.<org.apache.camel.processor.Throttler: long timePeriodMillis>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (org.apache.camel.Expression,long)>(v, v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("throttle[\u per: \u]");
return v;
}
public java.lang.String toString()
{
org.apache.camel.processor.Throttler v;
org.apache.camel.AsyncProcessor v;
long v;
java.lang.String v;
org.apache.camel.Expression v;
v := @this: org.apache.camel.processor.Throttler;
v = v.<org.apache.camel.processor.Throttler: org.apache.camel.Expression maxRequestsPerPeriodExpression>;
v = v.<org.apache.camel.processor.Throttler: long timePeriodMillis>;
v = virtualinvoke v.<org.apache.camel.processor.Throttler: org.apache.camel.AsyncProcessor getProcessor()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (org.apache.camel.Expression,long,org.apache.camel.AsyncProcessor)>(v, v, v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("Throttler[requests: \u per: \u (ms) to: \u]");
return v;
}
}