Package org.infinispan.security.actions

Source Code of org.infinispan.security.actions.GetDefaultExecutorServiceAction

package org.infinispan.security.actions;

import java.security.PrivilegedAction;

import org.infinispan.Cache;
import org.infinispan.distexec.DefaultExecutorService;
import org.infinispan.util.concurrent.WithinThreadExecutor;

/**
* GetDefaultExecutorServiceAction.
*
* @author Tristan Tarrant
* @since 7.0
*/
public class GetDefaultExecutorServiceAction implements PrivilegedAction<DefaultExecutorService>{

   private final Cache<?, ?> cache;

   public GetDefaultExecutorServiceAction(Cache<?, ?> cache) {
      this.cache = cache;
   }

   @Override
   public DefaultExecutorService run() {
      return new DefaultExecutorService(cache, new WithinThreadExecutor());
   }

}
TOP

Related Classes of org.infinispan.security.actions.GetDefaultExecutorServiceAction

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.