protected static <T extends Set<?>> T allOptions(Class<?> type) {
        requireNonNull(type, "type");
        final Pool pool = map.get(type);
        if (pool == null) {
            @SuppressWarnings("unchecked")
            final T cast = (T) ImmutableSet.of();
            return cast;
        }

        @SuppressWarnings("unchecked")
        final T cast = (T) pool.getAll();
        return cast;
    }
Returns all available options of the specified option type.

@return the options which are instances of the specified {@code type}.
core/src/main/java/com/linecorp/armeria/common/util/AbstractOption.java