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
Modifier and TypeClassDescriptionstatic class
Condition that matches if any client config file exists.static class
Condition that matches if any instance config file exists. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
matches
(io.micronaut.context.condition.ConditionContext context) protected boolean
resourceExists
(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, wait
Methods 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:
matches
in 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.
-