Package org.infinispan.iteration.impl

Examples of org.infinispan.iteration.impl.EntryRetriever


      TestingUtil.replaceComponent(cache, RpcManager.class, mockManager, true);
      return rpc;
   }

   protected EntryRetriever waitUntilStartOfProcessingResult(final Cache<?, ?> cache, final CheckPoint checkPoint) {
      EntryRetriever rpc = TestingUtil.extractComponent(cache, EntryRetriever.class);
      final Answer<Object> forwardedAnswer = AdditionalAnswers.delegatesTo(rpc);
      EntryRetriever mockRetriever = mock(EntryRetriever.class, withSettings().defaultAnswer(forwardedAnswer));
      doAnswer(new Answer() {
         @Override
         public Object answer(InvocationOnMock invocation) throws Throwable {
            // Wait for main thread to sync up
            checkPoint.trigger("pre_receive_response_invoked");
View Full Code Here


         cache.put(key, value);
      }

      final CheckPoint checkPoint = new CheckPoint();

      EntryRetriever retriever = waitUntilRetrievingIterator(cache, checkPoint);
      try {
         Future<Void> future = fork(new Callable<Void>() {

            @Override
            public Void call() throws Exception {
View Full Code Here

         cache.put(key, value);
      }

      CheckPoint checkPoint = new CheckPoint();

      EntryRetriever retriever = waitUntilClosingIterator(cache, checkPoint);

      try {
         Future<Void> future = fork(new Callable<Void>() {

            @Override
View Full Code Here

      TestingUtil.replaceComponent(cache, ClusterCacheNotifier.class, notifier, true);
      return realNotifier;
   }

   protected EntryRetriever waitUntilRetrievingIterator(final Cache<?, ?> cache, final CheckPoint checkPoint) {
      EntryRetriever retriever = TestingUtil.extractComponent(cache, EntryRetriever.class);
      final Answer<Object> forwardedAnswer = AdditionalAnswers.delegatesTo(retriever);
      EntryRetriever mockRetriever = mock(EntryRetriever.class, withSettings().defaultAnswer(forwardedAnswer));
      doAnswer(new Answer() {
         @Override
         public Object answer(InvocationOnMock invocation) throws Throwable {
            // Wait for main thread to sync up
            checkPoint.trigger("pre_retrieve_entry_invoked");
View Full Code Here

      TestingUtil.replaceComponent(cache, EntryRetriever.class, mockRetriever, true);
      return retriever;
   }

   protected EntryRetriever waitUntilClosingIterator(final Cache<?, ?> cache, final CheckPoint checkPoint) {
      EntryRetriever retriever = TestingUtil.extractComponent(cache, EntryRetriever.class);
      final Answer<Object> forwardedAnswer = AdditionalAnswers.delegatesTo(retriever);
      EntryRetriever mockRetriever = mock(EntryRetriever.class, withSettings().defaultAnswer(forwardedAnswer));

      doAnswer(new Answer() {
         @Override
         public Object answer(InvocationOnMock invocation) throws Throwable {
            CloseableIterator realIter = (CloseableIterator)forwardedAnswer.answer(invocation);
View Full Code Here

      TestingUtil.replaceComponent(cache, RpcManager.class, mockManager, true);
      return rpc;
   }

   protected EntryRetriever waitUntilStartOfProcessingResult(final Cache<?, ?> cache, final CheckPoint checkPoint) {
      EntryRetriever rpc = TestingUtil.extractComponent(cache, EntryRetriever.class);
      final Answer<Object> forwardedAnswer = AdditionalAnswers.delegatesTo(rpc);
      EntryRetriever mockRetriever = mock(EntryRetriever.class, withSettings().defaultAnswer(forwardedAnswer));
      doAnswer(new Answer() {
         @Override
         public Object answer(InvocationOnMock invocation) throws Throwable {
            // Wait for main thread to sync up
            checkPoint.trigger("pre_receive_response_invoked");
View Full Code Here

         cache.put(key, value);
      }

      final CheckPoint checkPoint = new CheckPoint();

      EntryRetriever retriever = waitUntilRetrievingIterator(cache, checkPoint);
      try {
         Future<Void> future = fork(new Callable<Void>() {

            @Override
            public Void call() throws Exception {
View Full Code Here

         cache.put(key, value);
      }

      CheckPoint checkPoint = new CheckPoint();

      EntryRetriever retriever = waitUntilClosingIterator(cache, checkPoint);

      try {
         Future<Void> future = fork(new Callable<Void>() {

            @Override
View Full Code Here

      TestingUtil.replaceComponent(cache, ClusterCacheNotifier.class, notifier, true);
      return realNotifier;
   }

   protected EntryRetriever waitUntilRetrievingIterator(final Cache<?, ?> cache, final CheckPoint checkPoint) {
      EntryRetriever retriever = TestingUtil.extractComponent(cache, EntryRetriever.class);
      final Answer<Object> forwardedAnswer = AdditionalAnswers.delegatesTo(retriever);
      EntryRetriever mockRetriever = mock(EntryRetriever.class, withSettings().defaultAnswer(forwardedAnswer));
      doAnswer(new Answer() {
         @Override
         public Object answer(InvocationOnMock invocation) throws Throwable {
            // Wait for main thread to sync up
            checkPoint.trigger("pre_retrieve_entry_invoked");
View Full Code Here

      TestingUtil.replaceComponent(cache, EntryRetriever.class, mockRetriever, true);
      return retriever;
   }

   protected EntryRetriever waitUntilClosingIterator(final Cache<?, ?> cache, final CheckPoint checkPoint) {
      EntryRetriever retriever = TestingUtil.extractComponent(cache, EntryRetriever.class);
      final Answer<Object> forwardedAnswer = AdditionalAnswers.delegatesTo(retriever);
      EntryRetriever mockRetriever = mock(EntryRetriever.class, withSettings().defaultAnswer(forwardedAnswer));

      doAnswer(new Answer() {
         @Override
         public Object answer(InvocationOnMock invocation) throws Throwable {
            CloseableIterator realIter = (CloseableIterator)forwardedAnswer.answer(invocation);
View Full Code Here

TOP

Related Classes of org.infinispan.iteration.impl.EntryRetriever

Copyright © 2018 www.massapicom. 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.