/** * Checking all rules about the asynchronous resource. * * @param name the unique name of the protected resource * @throws BlockException if the block criteria is met, eg. when any rule's threshold is exceeded * @since 0.2.0 */ public static AsyncEntry asyncEntry(String name) throws BlockException { return Env.sph.asyncEntry(name, EntryType.OUT, 1, OBJECTS0); }
/** * Checking all {@link Rule}s about the protected method. * * @param method the protected method * @throws BlockException if the block criteria is met, eg. when any rule's threshold is exceeded. */ public static Entry entry(Method method) throws BlockException { return Env.sph.entry(method, EntryType.OUT, 1, OBJECTS0); }
/** * Checking all {@link Rule}s related the resource. The entry is prioritized. * * @param name the unique name for the protected resource * @throws BlockException if the block criteria is met, eg. when any rule's threshold is exceeded. * @since 1.4.0 */ public static Entry entryWithPriority(String name) throws BlockException { return Env.sph.entryWithPriority(name, EntryType.OUT, 1, true); }
/** * Checking all {@link Rule}s about the resource. * * @param name the unique name for the protected resource * @param type the resource is an inbound or an outbound method. This is used * to mark whether it can be blocked when the system is unstable, * only inbound traffic could be blocked by {@link SystemRule} * @throws BlockException if the block criteria is met, eg. when any rule's threshold is exceeded. */ public static Entry entry(String name, EntryType type) throws BlockException { return Env.sph.entry(name, type, 1, OBJECTS0); }
/** * Checking all {@link Rule}s about the asynchronous resource. * * @param name the unique name for the protected resource * @param type the resource is an inbound or an outbound method. This is used * to mark whether it can be blocked when the system is unstable, * only inbound traffic could be blocked by {@link SystemRule} * @throws BlockException if the block criteria is met, eg. when any rule's threshold is exceeded * @since 0.2.0 */ public static AsyncEntry asyncEntry(String name, EntryType type) throws BlockException { return Env.sph.asyncEntry(name, type, 1, OBJECTS0); }
/** * Checking all {@link Rule}s related the resource. The entry is prioritized. * * @param name the unique name for the protected resource * @param type the resource is an inbound or an outbound method. This is used * to mark whether it can be blocked when the system is unstable, * only inbound traffic could be blocked by {@link SystemRule} * @throws BlockException if the block criteria is met, eg. when any rule's threshold is exceeded. * @since 1.4.0 */ public static Entry entryWithPriority(String name, EntryType type) throws BlockException { return Env.sph.entryWithPriority(name, type, 1, true); } }
/** * Checking all {@link Rule}s about the resource. * * @param name the unique name for the protected resource * @param type the resource is an inbound or an outbound method. This is used * to mark whether it can be blocked when the system is unstable, * only inbound traffic could be blocked by {@link SystemRule} * @param count tokens required * @throws BlockException if the block criteria is met, eg. when any rule's threshold is exceeded. */ public static Entry entry(String name, EntryType type, int count) throws BlockException { return Env.sph.entry(name, type, count, OBJECTS0); }
/** * Checking all {@link Rule}s about the asynchronous resource. * * @param name the unique name for the protected resource * @param type the resource is an inbound or an outbound method. This is used * to mark whether it can be blocked when the system is unstable, * only inbound traffic could be blocked by {@link SystemRule} * @param count tokens required * @param args extra parameters * @throws BlockException if the block criteria is met, eg. when any rule's threshold is exceeded * @since 0.2.0 */ public static AsyncEntry asyncEntry(String name, EntryType type, int count, Object... args) throws BlockException { return Env.sph.asyncEntry(name, type, count, args); }
/** * Checking all {@link Rule}s related the resource. The entry is prioritized. * * @param name the unique name for the protected resource * @throws BlockException if the block criteria is met, eg. when any rule's threshold is exceeded. * @since 1.4.0 */ public static Entry entryWithPriority(String name) throws BlockException { return Env.sph.entryWithPriority(name, EntryType.OUT, 1, true); }
/** * Checking all {@link Rule}s about the resource. * * @param name the unique string for the resource * @param count tokens required * @throws BlockException if the block criteria is met, eg. when any rule's threshold is exceeded. */ public static Entry entry(String name, int count) throws BlockException { return Env.sph.entry(name, EntryType.OUT, count, OBJECTS0); }
/** * Checking all rules about the asynchronous resource. * * @param name the unique name of the protected resource * @throws BlockException if the block criteria is met, eg. when any rule's threshold is exceeded * @since 0.2.0 */ public static AsyncEntry asyncEntry(String name) throws BlockException { return Env.sph.asyncEntry(name, EntryType.OUT, 1, OBJECTS0); }
/** * Checking all {@link Rule}s related the resource. The entry is prioritized. * * @param name the unique name for the protected resource * @param type the resource is an inbound or an outbound method. This is used * to mark whether it can be blocked when the system is unstable, * only inbound traffic could be blocked by {@link SystemRule} * @throws BlockException if the block criteria is met, eg. when any rule's threshold is exceeded. * @since 1.4.0 */ public static Entry entryWithPriority(String name, EntryType type) throws BlockException { return Env.sph.entryWithPriority(name, type, 1, true); } }
/** * Checking all {@link Rule}s about the resource. * * @param name the unique name of the protected resource * @throws BlockException if the block criteria is met, eg. when any rule's threshold is exceeded. */ public static Entry entry(String name) throws BlockException { return Env.sph.entry(name, EntryType.OUT, 1, OBJECTS0); }
/** * Checking all {@link Rule}s about the asynchronous resource. * * @param name the unique name for the protected resource * @param type the resource is an inbound or an outbound method. This is used * to mark whether it can be blocked when the system is unstable, * only inbound traffic could be blocked by {@link SystemRule} * @throws BlockException if the block criteria is met, eg. when any rule's threshold is exceeded * @since 0.2.0 */ public static AsyncEntry asyncEntry(String name, EntryType type) throws BlockException { return Env.sph.asyncEntry(name, type, 1, OBJECTS0); }
/** * Checking all {@link Rule}s about the protected method. * * @param method the protected method * @param count tokens required * @throws BlockException if the block criteria is met, eg. when any rule's threshold is exceeded. */ public static Entry entry(Method method, int count) throws BlockException { return Env.sph.entry(method, EntryType.OUT, count, OBJECTS0); }
/** * Checking all {@link Rule}s about the asynchronous resource. * * @param name the unique name for the protected resource * @param type the resource is an inbound or an outbound method. This is used * to mark whether it can be blocked when the system is unstable, * only inbound traffic could be blocked by {@link SystemRule} * @param count tokens required * @param args extra parameters * @throws BlockException if the block criteria is met, eg. when any rule's threshold is exceeded * @since 0.2.0 */ public static AsyncEntry asyncEntry(String name, EntryType type, int count, Object... args) throws BlockException { return Env.sph.asyncEntry(name, type, count, args); }
/** * Checking all {@link Rule}s about the protected method. * * @param method the protected method * @param type the resource is an inbound or an outbound method. This is used * to mark whether it can be blocked when the system is unstable, * only inbound traffic could be blocked by {@link SystemRule} * @throws BlockException if the block criteria is met, eg. when any rule's threshold is exceeded. */ public static Entry entry(Method method, EntryType type) throws BlockException { return Env.sph.entry(method, type, 1, OBJECTS0); }
/** * Checking all {@link Rule}s about the protected method. * * @param method the protected method * @param type the resource is an inbound or an outbound method. This is used * to mark whether it can be blocked when the system is unstable, * only inbound traffic could be blocked by {@link SystemRule} * @param count tokens required * @throws BlockException if the block criteria is met, eg. when any rule's threshold is exceeded. */ public static Entry entry(Method method, EntryType type, int count) throws BlockException { return Env.sph.entry(method, type, count, OBJECTS0); }
/** * Checking all {@link Rule}s about the protected method. * * @param method the protected method * @param type the resource is an inbound or an outbound method. This is used * to mark whether it can be blocked when the system is unstable, * only inbound traffic could be blocked by {@link SystemRule} * @param count tokens required * @param args the parameters of the method. * @throws BlockException if the block criteria is met, eg. when any rule's threshold is exceeded. */ public static Entry entry(Method method, EntryType type, int count, Object... args) throws BlockException { return Env.sph.entry(method, type, count, args); }
/** * Checking all {@link Rule}s about the resource. * * @param name the unique name for the protected resource * @param type the resource is an inbound or an outbound method. This is used * to mark whether it can be blocked when the system is unstable, * only inbound traffic could be blocked by {@link SystemRule} * @param count tokens required * @param args extra parameters. * @throws BlockException if the block criteria is met, eg. when any rule's threshold is exceeded. */ public static Entry entry(String name, EntryType type, int count, Object... args) throws BlockException { return Env.sph.entry(name, type, count, args); }