org.infinispan.counter.impl.manager.ClusteredCounterPackageImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of infinispan-clustered-counter
Show all versions of infinispan-clustered-counter
Infinispan Clustered Counter module
package org.infinispan.counter.impl.manager;
import java.util.Arrays;
import java.util.Collections;
import javax.annotation.Generated;
import org.infinispan.factories.impl.ComponentAccessor;
import org.infinispan.factories.impl.ModuleMetadataBuilder;
import org.infinispan.factories.impl.MBeanMetadata;
import org.infinispan.factories.impl.MBeanMetadata.AttributeMetadata;
import org.infinispan.factories.impl.MBeanMetadata.OperationMetadata;
import org.infinispan.factories.impl.MBeanMetadata.OperationParameterMetadata;
import org.infinispan.factories.impl.WireContext;
import org.infinispan.lifecycle.ModuleLifecycle;
/**
* @private
*/
@Generated(value = "org.infinispan.component.processor.Generator", date = "2021-03-12T12:46:05.494569Z")
public final class ClusteredCounterPackageImpl {
public static void registerMetadata(ModuleMetadataBuilder.ModuleBuilder builder) {
//start org.infinispan.counter.impl.manager.CounterManagerFactory
builder.registerComponentAccessor("org.infinispan.counter.impl.manager.CounterManagerFactory",
Arrays.asList("org.infinispan.counter.api.CounterManager"),
new ComponentAccessor("org.infinispan.counter.impl.manager.CounterManagerFactory",
0, false, null,
Arrays.asList("org.infinispan.manager.EmbeddedCacheManager")) {
protected void wire(CounterManagerFactory instance, WireContext context, boolean start) {
instance.cacheManager = context.get("org.infinispan.manager.EmbeddedCacheManager", org.infinispan.manager.EmbeddedCacheManager.class, start);
}
});
//start org.infinispan.counter.impl.manager.EmbeddedCounterManager
builder.registerComponentAccessor("org.infinispan.counter.impl.manager.EmbeddedCounterManager",
Collections.emptyList(),
new ComponentAccessor("org.infinispan.counter.impl.manager.EmbeddedCounterManager",
0, false, null,
Arrays.asList("org.infinispan.util.concurrent.BlockingManager")) {
protected void wire(EmbeddedCounterManager instance, WireContext context, boolean start) {
instance.blockingManager = context.get("org.infinispan.util.concurrent.BlockingManager", org.infinispan.util.concurrent.BlockingManager.class, start);
}
protected void start(EmbeddedCounterManager instance) throws Exception {
instance.start();
}
protected void stop(EmbeddedCounterManager instance) throws Exception {
instance.stop();
}
});
builder.registerMBeanMetadata("org.infinispan.counter.impl.manager.EmbeddedCounterManager",
MBeanMetadata.of("CounterManager", "Component to manage counters", null,
new OperationMetadata("remove", "remove", "Removes the counter's value from the cluster. The counter will be re-created when access next time.", "void",
new OperationParameterMetadata("counterName", "java.lang.String", "null")
),
new OperationMetadata("getCounterNames", "counters", "Returns a collection of defined counter's name.", "java.util.Collection"
),
new OperationMetadata("getValue", "value", "Returns the current counter's value", "long",
new OperationParameterMetadata("counterName", "java.lang.String", "null")
),
new OperationMetadata("reset", "reset", "Resets the counter's value", "void",
new OperationParameterMetadata("counterName", "java.lang.String", "null")
),
new OperationMetadata("getCounterConfiguration", "configuration", "Returns the counter's configuration", "java.util.Properties",
new OperationParameterMetadata("counterName", "java.lang.String", "null")
)
));
//end
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy