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

org.infinispan.extendedstats.topK.ExtendedStatisticsPackageImpl Maven / Gradle / Ivy

There is a newer version: 14.0.31.Final
Show newest version
package org.infinispan.extendedstats.topK;

import java.util.Arrays;
import java.util.Collections;
import javax.annotation.processing.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;

/**
 * @api.private 
 */
@Generated(value = "org.infinispan.component.processor.Generator", date = "2024-09-24T20:34:24.088875148Z")
public final class ExtendedStatisticsPackageImpl {
   public static void registerMetadata(ModuleMetadataBuilder.ModuleBuilder builder) {
//start org.infinispan.extendedstats.topK.CacheUsageInterceptor
      builder.registerComponentAccessor("org.infinispan.extendedstats.topK.CacheUsageInterceptor",
         Collections.emptyList(),
         new ComponentAccessor("org.infinispan.extendedstats.topK.CacheUsageInterceptor",
            1, false, "org.infinispan.interceptors.BaseCustomAsyncInterceptor",
            Arrays.asList("org.infinispan.factories.impl.BasicComponentRegistry", "org.infinispan.distribution.DistributionManager")) {
         protected void wire(CacheUsageInterceptor instance, WireContext context, boolean start) {
            instance.componentRegistry = context.get("org.infinispan.factories.impl.BasicComponentRegistry", org.infinispan.factories.impl.BasicComponentRegistry.class, start);
            instance.distributionManager = context.get("org.infinispan.distribution.DistributionManager", org.infinispan.distribution.DistributionManager.class, start);
         }

      });

      builder.registerMBeanMetadata("org.infinispan.extendedstats.topK.CacheUsageInterceptor",
         MBeanMetadata.of("CacheUsageStatistics", "Keeps tracks of the accessed keys", null,
            new AttributeMetadata("capacity", "Shows the current capacity for top-K values", false, true, "int", false, (java.util.function.Function) org.infinispan.extendedstats.topK.CacheUsageInterceptor::getCapacity, null, false),
            new AttributeMetadata("remoteTopGets", "Show the top 10 keys most read remotely by this instance", false, true, "java.util.Map", false, null, null, false),
            new AttributeMetadata("localTopGets", "Show the top 10 keys most read locally by this instance", false, true, "java.util.Map", false, null, null, false),
            new AttributeMetadata("remoteTopPuts", "Show the top 10 keys most write remotely by this instance", false, true, "java.util.Map", false, null, null, false),
            new AttributeMetadata("localTopPuts", "Show the top 10 keys most write locally by this instance", false, true, "java.util.Map", false, null, null, false),
            new AttributeMetadata("topLockedKeys", "Show the top 10 keys most locked", false, true, "java.util.Map", false, null, null, false),
            new AttributeMetadata("topContendedKeys", "Show the top 10 keys most contended", false, true, "java.util.Map", false, null, null, false),
            new AttributeMetadata("topLockFailedKeys", "Show the top 10 keys whose lock acquisition failed by timeout", false, true, "java.util.Map", false, null, null, false),
            new AttributeMetadata("topWriteSkewFailedKeys", "Show the top 10 keys whose write skew check was failed", false, true, "java.util.Map", false, null, null, false),
            new OperationMetadata("resetStatistics", "", "Resets statistics gathered by this component", "void"
            ),
            new OperationMetadata("setTopKValue", "", "Set K for the top-K values", "void",
               new OperationParameterMetadata("n", "int", "the n-th top key to collect")
            ),
            new OperationMetadata("getNRemoteTopGets", "", "Show the top n keys most read remotely by this instance", "java.util.Map",
               new OperationParameterMetadata("n", "int", "the n-th top key to return")
            ),
            new OperationMetadata("getNLocalTopGets", "", "Show the top n keys most read locally by this instance", "java.util.Map",
               new OperationParameterMetadata("n", "int", "the n-th top key to return")
            ),
            new OperationMetadata("getNRemoteTopPuts", "", "Show the top n keys most write remotely by this instance", "java.util.Map",
               new OperationParameterMetadata("n", "int", "the n-th top key to return")
            ),
            new OperationMetadata("getNLocalTopPuts", "", "Show the top n keys most write locally by this instance", "java.util.Map",
               new OperationParameterMetadata("n", "int", "the n-th top key to return")
            ),
            new OperationMetadata("getNTopLockedKeys", "", "Show the top n keys most locked", "java.util.Map",
               new OperationParameterMetadata("n", "int", "the n-th top key to return")
            ),
            new OperationMetadata("getNTopContendedKeys", "", "Show the top n keys most contended", "java.util.Map",
               new OperationParameterMetadata("n", "int", "the n-th top key to return")
            ),
            new OperationMetadata("getNTopLockFailedKeys", "", "Show the top n keys whose lock acquisition failed ", "java.util.Map",
               new OperationParameterMetadata("n", "int", "the n-th top key to return")
            ),
            new OperationMetadata("getNTopWriteSkewFailedKeys", "", "Show the top n keys whose write skew check was failed", "java.util.Map",
               new OperationParameterMetadata("n", "int", "the n-th top key to return")
            ),
            new OperationMetadata("setStatisticsEnabled", "", "Show the top n keys whose write skew check was failed", "void",
               new OperationParameterMetadata("enabled", "boolean", "true to enable the top-k collection")
            )
      ));

//end
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy