All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jboss.as.clustering.infinispan.subsystem.CacheRuntimeResourceProvider Maven / Gradle / Ivy

There is a newer version: 34.0.0.Final
Show newest version
/*
 * Copyright The WildFly Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package org.jboss.as.clustering.infinispan.subsystem;

import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.concurrent.ConcurrentHashMap;

import org.jboss.as.clustering.controller.ChildResourceProvider;
import org.jboss.as.clustering.controller.ComplexResource;
import org.jboss.as.clustering.controller.SimpleChildResourceProvider;
import org.jboss.as.controller.registry.PlaceholderResource;
import org.wildfly.common.function.Functions;

/**
 * @author Paul Ferraro
 */
public class CacheRuntimeResourceProvider extends SimpleChildResourceProvider {

    private static final ChildResourceProvider CHILD_PROVIDER = new SimpleChildResourceProvider(Collections.unmodifiableSet(new HashSet<>(Arrays.asList(
            LockingRuntimeResourceDefinition.PATH.getValue(),
            PersistenceRuntimeResourceDefinition.PATH.getValue(),
            PartitionHandlingRuntimeResourceDefinition.PATH.getValue(),
            TransactionRuntimeResourceDefinition.PATH.getValue()))));

    public CacheRuntimeResourceProvider() {
        super(ConcurrentHashMap.newKeySet(), Functions.constantSupplier(new ComplexResource(PlaceholderResource.INSTANCE, Collections.singletonMap(CacheComponentRuntimeResourceDefinition.WILDCARD_PATH.getKey(), CHILD_PROVIDER))));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy