Package org.infinispan.commons

Examples of org.infinispan.commons.CacheListenerException


               for (int i = 0; i < members.size() - 1; ++i) {
                  try {
                     decs.take().get();
                  } catch (InterruptedException e) {
                     throw new CacheListenerException(e);
                  } catch (ExecutionException e) {
                     throw new CacheListenerException(e);
                  }
               }

               int extraCount = 0;
               // If anyone else joined since we sent these we have to send the listeners again, since they may have queried
               // before the other nodes got the new listener
               List<Address> membersAfter = manager.getMembers();
               for (Address member : membersAfter) {
                  if (!members.contains(member) && !member.equals(ourAddress)) {
                     if (log.isTraceEnabled()) {
                        log.tracef("Found additional node %s that joined during replication of cluster listener with id %s",
                                   member, generatedId);
                     }
                     extraCount++;
                     decs.submit(member, callable);
                  }
               }

               for (int i = 0; i < extraCount; ++i) {
                  try {
                     decs.take().get();
                  } catch (InterruptedException e) {
                     throw new CacheListenerException(e);
                  } catch (ExecutionException e) {
                     throw new CacheListenerException(e);
                  }
               }
            }
         }
      }
View Full Code Here


         List<Future<?>> futures = distExecutorService.submitEverywhere(new ClusterListenerRemoveCallable(id));
         for (Future<?> future : futures) {
            try {
               future.get();
            } catch (InterruptedException e) {
               throw new CacheListenerException(e);
            } catch (ExecutionException e) {
               throw new CacheListenerException(e);
            }
         }
      }
   }
View Full Code Here

            for (int i = 0; i < members.size() - 1; ++i) {
               try {
                  decs.take().get();
               } catch (InterruptedException e) {
                  throw new CacheListenerException(e);
               } catch (ExecutionException e) {
                  throw new CacheListenerException(e);
               }
            }

            int extraCount = 0;
            // If anyone else joined since we sent these we have to send the listeners again, since they may have queried
            // before the other nodes got the new listener
            List<Address> membersAfter = manager.getMembers();
            for (Address member : membersAfter) {
               if (!members.contains(member) && !member.equals(ourAddress)) {
                  if (log.isTraceEnabled()) {
                     log.tracef("Found additional node %s that joined during replication of cluster listener with id %s",
                                member, generatedId);
                  }
                  extraCount++;
                  decs.submit(member, callable);
               }
            }

            for (int i = 0; i < extraCount; ++i) {
               try {
                  decs.take().get();
               } catch (InterruptedException e) {
                  throw new CacheListenerException(e);
               } catch (ExecutionException e) {
                  throw new CacheListenerException(e);
               }
            }
         }
      }
View Full Code Here

         List<Future<?>> futures = distExecutorService.submitEverywhere(new ClusterListenerRemoveCallable(id));
         for (Future<?> future : futures) {
            try {
               future.get();
            } catch (InterruptedException e) {
               throw new CacheListenerException(e);
            } catch (ExecutionException e) {
               throw new CacheListenerException(e);
            }
         }
      }
   }
View Full Code Here

TOP

Related Classes of org.infinispan.commons.CacheListenerException

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.