类的使用
com.alibaba.csp.sentinel.context.Context
使用Context的程序包
程序包
说明
-
com.alibaba.csp.sentinel中Context的使用
声明为Context的com.alibaba.csp.sentinel中的字段类型参数类型为Context的com.alibaba.csp.sentinel中的字段参数类型为Context的com.alibaba.csp.sentinel中的方法修饰符和类型方法说明static voidTracer.traceContext(Throwable e, int count, Context context) 已过时。static voidTracer.traceContext(Throwable e, Context context) Trace providedThrowableto current entry of given entrance context.类型变量类型为Context的com.alibaba.csp.sentinel中的方法参数修饰符和类型方法说明abstract voidEntry.whenTerminate(BiConsumer<Context, Entry> handler) LikeCompletableFuturesince JDK 8, it guarantees specified handler is invoked when this entry terminated (exited), no matter it's blocked or permitted. -
com.alibaba.csp.sentinel.context中Context的使用
修饰符和类型类说明classIf totalContextexceedConstants.MAX_CONTEXT_NAME_SIZE, aNullContextwill get when invokeContextUtil.enter(), means no rules checking will do.修饰符和类型方法说明static ContextEnter the invocation context, which marks as the entrance of an invocation chain.static ContextEnter the invocation context, which marks as the entrance of an invocation chain.static ContextContextUtil.getContext()GetContextof current thread.static ContextContext.newAsyncContext(DefaultNode entranceNode, String name) Create a new async context.Context.setCurEntry(Entry curEntry) Context.setCurNode(Node node) protected static Context参数类型为Context的com.alibaba.csp.sentinel.context中的方法修饰符和类型方法说明static booleanContextUtil.isDefaultContext(Context context) Check if provided context is a default auto-created context.static voidContextUtil.runOnContext(Context context, Runnable f) Execute the code within provided context. -
com.alibaba.csp.sentinel.metric.extension.callback中Context的使用
修饰符和类型方法说明voidMetricEntryCallback.onBlocked(BlockException ex, Context context, ResourceWrapper resourceWrapper, DefaultNode param, int count, Object... args) voidMetricExitCallback.onExit(Context context, ResourceWrapper rw, int acquireCount, Object... args) voidMetricEntryCallback.onPass(Context context, ResourceWrapper rw, DefaultNode param, int count, Object... args) -
com.alibaba.csp.sentinel.slotchain中Context的使用
修饰符和类型方法说明voidDefaultProcessorSlotChain.entry(Context context, ResourceWrapper resourceWrapper, Object t, int count, boolean prioritized, Object... args) voidProcessorSlot.entry(Context context, ResourceWrapper resourceWrapper, T param, int count, boolean prioritized, Object... args) Entrance of this slot.voidDefaultProcessorSlotChain.exit(Context context, ResourceWrapper resourceWrapper, int count, Object... args) voidProcessorSlot.exit(Context context, ResourceWrapper resourceWrapper, int count, Object... args) Exit of this slot.voidAbstractLinkedProcessorSlot.fireEntry(Context context, ResourceWrapper resourceWrapper, Object obj, int count, boolean prioritized, Object... args) voidProcessorSlot.fireEntry(Context context, ResourceWrapper resourceWrapper, Object obj, int count, boolean prioritized, Object... args) voidAbstractLinkedProcessorSlot.fireExit(Context context, ResourceWrapper resourceWrapper, int count, Object... args) voidProcessorSlot.fireExit(Context context, ResourceWrapper resourceWrapper, int count, Object... args) Means finish ofProcessorSlot.exit(Context, ResourceWrapper, int, Object...).voidProcessorSlotEntryCallback.onBlocked(BlockException ex, Context context, ResourceWrapper resourceWrapper, T param, int count, Object... args) voidProcessorSlotExitCallback.onExit(Context context, ResourceWrapper resourceWrapper, int count, Object... args) voidProcessorSlotEntryCallback.onPass(Context context, ResourceWrapper resourceWrapper, T param, int count, Object... args) -
com.alibaba.csp.sentinel.slots.block.authority中Context的使用
修饰符和类型方法说明voidAuthoritySlot.entry(Context context, ResourceWrapper resourceWrapper, DefaultNode node, int count, boolean prioritized, Object... args) voidAuthoritySlot.exit(Context context, ResourceWrapper resourceWrapper, int count, Object... args) -
com.alibaba.csp.sentinel.slots.block.degrade中Context的使用
修饰符和类型方法说明voidDefaultCircuitBreakerSlot.entry(Context context, ResourceWrapper resourceWrapper, DefaultNode node, int count, boolean prioritized, Object... args) voidDegradeSlot.entry(Context context, ResourceWrapper resourceWrapper, DefaultNode node, int count, boolean prioritized, Object... args) voidDefaultCircuitBreakerSlot.exit(Context context, ResourceWrapper r, int count, Object... args) voidDegradeSlot.exit(Context context, ResourceWrapper r, int count, Object... args) -
com.alibaba.csp.sentinel.slots.block.degrade.circuitbreaker中Context的使用
修饰符和类型方法说明protected booleanAbstractCircuitBreaker.fromOpenToHalfOpen(Context context) voidCircuitBreaker.onRequestComplete(Context context) Record a completed request with the context and handle state transformation of the circuit breaker.voidExceptionCircuitBreaker.onRequestComplete(Context context) voidResponseTimeCircuitBreaker.onRequestComplete(Context context) booleanbooleanAcquires permission of an invocation only if it is available at the time of invoking. -
com.alibaba.csp.sentinel.slots.block.flow中Context的使用
修饰符和类型方法说明booleanFlowRuleChecker.canPassCheck(FlowRule rule, Context context, DefaultNode node, int acquireCount) booleanFlowRuleChecker.canPassCheck(FlowRule rule, Context context, DefaultNode node, int acquireCount, boolean prioritized) voidFlowRuleChecker.checkFlow(Function<String, Collection<FlowRule>> ruleProvider, ResourceWrapper resource, Context context, DefaultNode node, int count, boolean prioritized) voidFlowSlot.entry(Context context, ResourceWrapper resourceWrapper, DefaultNode node, int count, boolean prioritized, Object... args) voidFlowSlot.exit(Context context, ResourceWrapper resourceWrapper, int count, Object... args) -
com.alibaba.csp.sentinel.slots.clusterbuilder中Context的使用
修饰符和类型方法说明voidClusterBuilderSlot.entry(Context context, ResourceWrapper resourceWrapper, DefaultNode node, int count, boolean prioritized, Object... args) voidClusterBuilderSlot.exit(Context context, ResourceWrapper resourceWrapper, int count, Object... args) -
com.alibaba.csp.sentinel.slots.logger中Context的使用
修饰符和类型方法说明voidLogSlot.entry(Context context, ResourceWrapper resourceWrapper, DefaultNode obj, int count, boolean prioritized, Object... args) voidLogSlot.exit(Context context, ResourceWrapper resourceWrapper, int count, Object... args) -
com.alibaba.csp.sentinel.slots.nodeselector中Context的使用
修饰符和类型方法说明voidNodeSelectorSlot.entry(Context context, ResourceWrapper resourceWrapper, Object obj, int count, boolean prioritized, Object... args) voidNodeSelectorSlot.exit(Context context, ResourceWrapper resourceWrapper, int count, Object... args) -
com.alibaba.csp.sentinel.slots.statistic中Context的使用
修饰符和类型方法说明voidStatisticSlot.entry(Context context, ResourceWrapper resourceWrapper, DefaultNode node, int count, boolean prioritized, Object... args) voidStatisticSlot.exit(Context context, ResourceWrapper resourceWrapper, int count, Object... args) -
com.alibaba.csp.sentinel.slots.system中Context的使用
修饰符和类型方法说明voidSystemSlot.entry(Context context, ResourceWrapper resourceWrapper, DefaultNode node, int count, boolean prioritized, Object... args) voidSystemSlot.exit(Context context, ResourceWrapper resourceWrapper, int count, Object... args)