Package org.infinispan.remoting.transport

Examples of org.infinispan.remoting.transport.BackupResponse


               }
            } else if (debug) {
               log.debugf("[X-Site State Transfer - %s] skip Persistence iteration", xSiteBackup.getSiteName());
            }

            BackupResponse response = backupResponseQueue.poll();
            while (response != null) {
               if (canceled.get()) {
                  return;
               }
               try {
                  response.waitForBackupToFinish();
               } catch (Exception e) {
                  log.unableToWaitForXSiteStateAcks(xSiteBackup.getSiteName(), e);
                  return;
               }
               response = backupResponseQueue.poll();
View Full Code Here


      }
   }

   private void controlStateTransferOnRemoteSite(XSiteBackup xSiteBackup, StateTransferControl control) throws Throwable {
      XSiteStateTransferControlCommand command = commandsFactory.buildXSiteStateTransferControlCommand(control, null);
      BackupResponse response = invokeRemotelyInRemoteSite(command, xSiteBackup);
      response.waitForBackupToFinish();
      if (!response.getFailedBackups().values().isEmpty()) {
         throw response.getFailedBackups().values().iterator().next();
      }
   }
View Full Code Here

   }

   @Override
   public BackupResponse backupCommit(CommitCommand command) throws Exception {
      //we have a 2PC: we didn't backup the 1PC stuff during prepare, we need to do it now.
      BackupResponse onePcResponse = sendTo1PCBackups(command);
      List<XSiteBackup> xSiteBackups = calculateBackupInfo(BackupFilter.KEEP_2PC_ONLY);
      BackupResponse twoPcResponse = backupCommand(command, xSiteBackups);
      return new AggregateBackupResponse(onePcResponse, twoPcResponse);
   }
View Full Code Here

               }
            } else if (debug) {
               log.debugf("[X-Site State Transfer - %s] skip Persistence iteration", xSiteBackup.getSiteName());
            }

            BackupResponse response = backupResponseQueue.poll();
            while (response != null) {
               if (canceled.get()) {
                  return;
               }
               try {
                  response.waitForBackupToFinish();
               } catch (Exception e) {
                  log.unableToWaitForXSiteStateAcks(xSiteBackup.getSiteName(), e);
                  return;
               }
               response = backupResponseQueue.poll();
View Full Code Here

      boolean isTxFromRemoteSite = isTxFromRemoteSite(command.getGlobalTransaction());
      if (isTxFromRemoteSite) {
         return invokeNextInterceptor(ctx, command);
      }

      BackupResponse backupResponse = backupSender.backupPrepare(command);
      Object result = invokeNextInterceptor(ctx, command);
      backupSender.processResponses(backupResponse, command, ctx.getTransaction());
      return result;
   }
View Full Code Here

      if (isTxFromRemoteSite(command.getGlobalTransaction())) {
         return invokeNextInterceptor(ctx, command);
      }

      BackupResponse backupResponse = backupSender.backupCommit(command);
      Object result = invokeNextInterceptor(ctx, command);
      backupSender.processResponses(backupResponse, command, ctx.getTransaction());
      return result;
   }
View Full Code Here

      if (isTxFromRemoteSite(command.getGlobalTransaction())) {
         return invokeNextInterceptor(ctx, command);
      }

      BackupResponse backupResponse = backupSender.backupRollback(command);
      Object result = invokeNextInterceptor(ctx, command);
      backupSender.processResponses(backupResponse, command, ctx.getTransaction());
      return result;
   }
View Full Code Here

      boolean isTxFromRemoteSite = isTxFromRemoteSite( command.getGlobalTransaction() );
      if (isTxFromRemoteSite) {
         return invokeNextInterceptor(ctx, command);
      }

      BackupResponse backupResponse = backupSender.backupPrepare(command);
      Object result = invokeNextInterceptor(ctx, command);
      backupSender.processResponses(backupResponse, command, ctx.getTransaction());
      return result;
   }
View Full Code Here

   }

   private Object handleWrite(InvocationContext ctx, WriteCommand command) throws Throwable {
      if (!ctx.isOriginLocal() || command.hasFlag(Flag.SKIP_XSITE_BACKUP))
         return invokeNextInterceptor(ctx, command);
      BackupResponse backupResponse = backupSender.backupWrite(command);
      Object result = invokeNextInterceptor(ctx, command);
      backupSender.processResponses(backupResponse, command);
      return result;
   }
View Full Code Here

      boolean isTxFromRemoteSite = isTxFromRemoteSite(command.getGlobalTransaction());
      if (isTxFromRemoteSite) {
         return invokeNextInterceptor(ctx, command);
      }

      BackupResponse backupResponse = backupSender.backupPrepare(command);
      Object result = invokeNextInterceptor(ctx, command);
      backupSender.processResponses(backupResponse, command, ctx.getTransaction());
      return result;
   }
View Full Code Here

TOP

Related Classes of org.infinispan.remoting.transport.BackupResponse

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.