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

org.infinispan.lock.impl.manager.ClusteredLockPackageImpl Maven / Gradle / Ivy

There is a newer version: 15.1.1.Final
Show newest version
package org.infinispan.lock.impl.manager;

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-01-22T07:00:36.497005032Z")
public final class ClusteredLockPackageImpl {
   public static void registerMetadata(ModuleMetadataBuilder.ModuleBuilder builder) {
//start org.infinispan.lock.impl.manager.EmbeddedClusteredLockManager
      builder.registerComponentAccessor("org.infinispan.lock.impl.manager.EmbeddedClusteredLockManager",
         Collections.emptyList(),
         new ComponentAccessor("org.infinispan.lock.impl.manager.EmbeddedClusteredLockManager",
            0, false, null,
            Arrays.asList("org.infinispan.manager.EmbeddedCacheManager", "org.infinispan.executors.timeout")) {
         protected void wire(EmbeddedClusteredLockManager instance, WireContext context, boolean start) {
            instance.cacheManager = context.get("org.infinispan.manager.EmbeddedCacheManager", org.infinispan.manager.EmbeddedCacheManager.class, start);
            instance.scheduledExecutorService = context.get("org.infinispan.executors.timeout", java.util.concurrent.ScheduledExecutorService.class, start);
         }

         protected void start(EmbeddedClusteredLockManager instance) throws Exception {
            instance.start();
         }

         protected void stop(EmbeddedClusteredLockManager instance) throws Exception {
            instance.stop();
         }

      });

      builder.registerMBeanMetadata("org.infinispan.lock.impl.manager.EmbeddedClusteredLockManager",
         MBeanMetadata.of("ClusteredLockManager", "Component to manage clustered locks", null,
            new OperationMetadata("isDefined", "isDefined", "Returns true if the lock is defined", "boolean",
               new OperationParameterMetadata("name", "java.lang.String", "null")
            ),
            new OperationMetadata("removeSync", "remove", "Removes the lock from the cluster. The lock has to be recreated to access next time.", "boolean",
               new OperationParameterMetadata("name", "java.lang.String", "null")
            ),
            new OperationMetadata("forceReleaseSync", "forceRelease", "Forces a release of the lock if such exist", "boolean",
               new OperationParameterMetadata("name", "java.lang.String", "null")
            ),
            new OperationMetadata("isLockedSync", "isLocked", "Returns true if the lock exists and is acquired", "boolean",
               new OperationParameterMetadata("name", "java.lang.String", "null")
            )
      ));

//end
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy