clustering/common/src/main/java/org/jboss/as/clustering/dmr/ModelNodes.java
public static OptionalInt optionalInt(ModelNode value) {
        return value.isDefined() ? OptionalInt.of(value.asInt()) : OptionalInt.empty();
    }
public static OptionalInt optionalInt(ModelNode value) {
        return value.isDefined() ? OptionalInt.of(value.asInt()) : OptionalInt.empty();
    }
Returns the optional int value of the specified {@link ModelNode}.
@param value the model node
@return an optional value