Search in sources :

Example 6 with ProcessorSlotChain

use of com.alibaba.csp.sentinel.slotchain.ProcessorSlotChain in project Sentinel by alibaba.

the class CtSphTest method addShouldPassSlotFor.

private ShouldPassSlot addShouldPassSlotFor(ResourceWrapper resourceWrapper) {
    ProcessorSlotChain slotChain = new DefaultProcessorSlotChain();
    ShouldPassSlot shouldPassSlot = new ShouldPassSlot();
    slotChain.addLast(shouldPassSlot);
    CtSph.getChainMap().put(resourceWrapper, slotChain);
    return shouldPassSlot;
}
Also used : ProcessorSlotChain(com.alibaba.csp.sentinel.slotchain.ProcessorSlotChain) DefaultProcessorSlotChain(com.alibaba.csp.sentinel.slotchain.DefaultProcessorSlotChain) DefaultProcessorSlotChain(com.alibaba.csp.sentinel.slotchain.DefaultProcessorSlotChain)

Aggregations

ProcessorSlotChain (com.alibaba.csp.sentinel.slotchain.ProcessorSlotChain)6 DefaultProcessorSlotChain (com.alibaba.csp.sentinel.slotchain.DefaultProcessorSlotChain)4 AbstractLinkedProcessorSlot (com.alibaba.csp.sentinel.slotchain.AbstractLinkedProcessorSlot)1 MethodResourceWrapper (com.alibaba.csp.sentinel.slotchain.MethodResourceWrapper)1 ProcessorSlot (com.alibaba.csp.sentinel.slotchain.ProcessorSlot)1 ResourceWrapper (com.alibaba.csp.sentinel.slotchain.ResourceWrapper)1 StringResourceWrapper (com.alibaba.csp.sentinel.slotchain.StringResourceWrapper)1 AuthoritySlot (com.alibaba.csp.sentinel.slots.block.authority.AuthoritySlot)1 DegradeSlot (com.alibaba.csp.sentinel.slots.block.degrade.DegradeSlot)1 FlowSlot (com.alibaba.csp.sentinel.slots.block.flow.FlowSlot)1 ClusterBuilderSlot (com.alibaba.csp.sentinel.slots.clusterbuilder.ClusterBuilderSlot)1 LogSlot (com.alibaba.csp.sentinel.slots.logger.LogSlot)1 NodeSelectorSlot (com.alibaba.csp.sentinel.slots.nodeselector.NodeSelectorSlot)1 StatisticSlot (com.alibaba.csp.sentinel.slots.statistic.StatisticSlot)1 SystemSlot (com.alibaba.csp.sentinel.slots.system.SystemSlot)1 HashMap (java.util.HashMap)1 Test (org.junit.Test)1