Class HazelcastConfigResourceCondition
java.lang.Object
io.micronaut.cache.hazelcast.condition.HazelcastConfigResourceCondition
- All Implemented Interfaces:
io.micronaut.context.condition.Condition,Predicate<io.micronaut.context.condition.ConditionContext>
- Direct Known Subclasses:
HazelcastConfigResourceCondition.HazelcastClientConfigCondition,HazelcastConfigResourceCondition.HazelcastInstanceConfigCondition
public class HazelcastConfigResourceCondition
extends Object
implements io.micronaut.context.condition.Condition
Condition classes for checking Hazelcast config resources.
- Since:
- 1.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCondition that matches if any client config file exists.static classCondition that matches if any instance config file exists. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanmatches(io.micronaut.context.condition.ConditionContext context) protected booleanresourceExists(io.micronaut.context.condition.ConditionContext<?> context, String[] paths) Checks whether any path given exists.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.context.condition.Condition
test
-
Field Details
-
CLIENT_CONFIG_FILES
-
INSTANCE_CONFIG_FILES
-
-
Constructor Details
-
HazelcastConfigResourceCondition
public HazelcastConfigResourceCondition()
-
-
Method Details
-
matches
public boolean matches(io.micronaut.context.condition.ConditionContext context) - Specified by:
matchesin interfaceio.micronaut.context.condition.Condition
-
resourceExists
protected boolean resourceExists(io.micronaut.context.condition.ConditionContext<?> context, String[] paths) Checks whether any path given exists.- Parameters:
context- the condition contextpaths- the paths to check- Returns:
- true if any of the given paths exists. False otherwise.
-