congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ComponentMetadataRepo.initialize
Code IndexAdd Tabnine to your IDE (free)

How to use
initialize
method
in
org.infinispan.factories.components.ComponentMetadataRepo

Best Java code snippets using org.infinispan.factories.components.ComponentMetadataRepo.initialize (Showing top 4 results out of 315)

origin: org.infinispan/infinispan-core

  private AsyncInterceptorChain newInterceptorChain(AsyncInterceptor... interceptors) {
   ComponentMetadataRepo componentMetadataRepo = new ComponentMetadataRepo();
   componentMetadataRepo.initialize(Collections.emptyList(), InterceptorChainTest.class.getClassLoader());

   AsyncInterceptorChain chain = new AsyncInterceptorChainImpl(componentMetadataRepo);
   for (AsyncInterceptor i : interceptors) {
     chain.appendInterceptor(i, false);
   }
   return chain;
  }
}
origin: org.infinispan/infinispan-core

@BeforeMethod(alwaysRun = true)
public void setup() {
 metadataRepo = new ComponentMetadataRepo();
 ClassLoader classLoader = this.getClass().getClassLoader();
 metadataRepo.initialize(ModuleProperties.getModuleMetadataFiles(classLoader), classLoader);
 globalRegistry = new BasicComponentRegistryImpl(classLoader, metadataRepo, Scopes.GLOBAL, null);
 cacheRegistry = new BasicComponentRegistryImpl(classLoader, metadataRepo, Scopes.NAMED_CACHE, globalRegistry);
}
origin: org.infinispan/infinispan-core

public void testConcurrentAddRemove() throws Exception {
 ComponentMetadataRepo componentMetadataRepo = new ComponentMetadataRepo();
 componentMetadataRepo.initialize(Collections.emptyList(), AsyncInterceptorChainTest.class.getClassLoader());
 AsyncInterceptorChainImpl ic = new AsyncInterceptorChainImpl(componentMetadataRepo);
 ic.addInterceptor(new DummyCallInterceptor(), 0);
origin: org.infinispan/infinispan-core

public void testConcurrentAddRemove() throws Exception {
 ComponentMetadataRepo componentMetadataRepo = new ComponentMetadataRepo();
 componentMetadataRepo.initialize(Collections.emptyList(), InterceptorChainTest.class.getClassLoader());
 AsyncInterceptorChainImpl asyncInterceptorChain =
    new AsyncInterceptorChainImpl(componentMetadataRepo);
 GlobalConfiguration globalConfiguration = new GlobalConfigurationBuilder().build();
 InterceptorChain ic = new InterceptorChain();
 TestingUtil.inject(ic, asyncInterceptorChain);
 ic.setFirstInChain(new DummyCallInterceptor());
 ic.addInterceptor(new DummyActivationInterceptor(), 1);
 CyclicBarrier barrier = new CyclicBarrier(4);
 List<Future<Void>> futures = new ArrayList<Future<Void>>(2);
 // We do test concurrent add/remove of different types per thread,
 // so that the final result is predictable (testable) and that we
 // can not possibly fail because of the InterceptorChain checking
 // that no interceptor is ever added twice.
 futures.add(fork(new InterceptorChainUpdater(ic, barrier, new DummyCacheMgmtInterceptor())));
 futures.add(fork(new InterceptorChainUpdater(ic, barrier, new DummyDistCacheWriterInterceptor())));
 futures.add(fork(new InterceptorChainUpdater(ic, barrier, new DummyInvalidationInterceptor())));
 barrier.await(); // wait for all threads to be ready
 barrier.await(); // wait for all threads to finish
 log.debug("All threads finished, let's shutdown the executor and check whether any exceptions were reported");
 for (Future<Void> future : futures) future.get();
 assert ic.containsInterceptorType(DummyCallInterceptor.class);
 assert ic.containsInterceptorType(DummyActivationInterceptor.class);
 assert ic.containsInterceptorType(DummyCacheMgmtInterceptor.class);
 assert ic.containsInterceptorType(DummyDistCacheWriterInterceptor.class);
 assert ic.containsInterceptorType(DummyInvalidationInterceptor.class);
 assert ic.asList().size() == 5 : "Resulting interceptor chain was actually " + ic.asList();
}
org.infinispan.factories.componentsComponentMetadataRepoinitialize

Popular methods of ComponentMetadataRepo

  • findComponentMetadata
  • <init>
  • getComponentMetadata
  • injectFactoryForComponent

Popular in Java

  • Finding current android device location
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onCreateOptionsMenu (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Notification (javax.management)
  • Reference (javax.naming)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now