Package org.hornetq.core.server

Examples of org.hornetq.core.server.LargeServerMessage


      }

      for (Pair<Long, Long> msgToDelete : pendingLargeMessages)
      {
         log.info("Deleting pending large message as it wasn't completed: LargeMessageID:" + msgToDelete.getB());
         LargeServerMessage msg = storageManager.createLargeMessage();
         msg.setMessageID(msgToDelete.getB());
         msg.setPendingRecordID(msgToDelete.getA());
         msg.setDurable(true);
         msg.deleteFile();
      }

      return journalInfo;
   }
View Full Code Here


   /**
    * @param packet
    */
   private void handleLargeMessageEnd(final ReplicationLargemessageEndMessage packet)
   {
      LargeServerMessage message = lookupLargeMessage(packet.getMessageId(), true);

      if (message != null)
      {
         try
         {
            message.deleteFile();
         }
         catch (Exception e)
         {
            ReplicationEndpointImpl.log.warn("Error deleting large message ID = " + packet.getMessageId(), e);
         }
View Full Code Here

   /**
    * @param packet
    */
   private void handleLargeMessageWrite(final ReplicationLargeMessageWriteMessage packet) throws Exception
   {
      LargeServerMessage message = lookupLargeMessage(packet.getMessageId(), false);
      if (message != null)
      {
         message.addBytes(packet.getBody());
      }
   }
View Full Code Here

      compareJournalInformation(request.getJournalInformation());
   }

   private LargeServerMessage lookupLargeMessage(final long messageId, final boolean delete)
   {
      LargeServerMessage message;

      if (delete)
      {
         message = largeMessages.remove(messageId);
      }
View Full Code Here

   /**
    * @param packet
    */
   private void handleLargeMessageBegin(final ReplicationLargeMessageBeingMessage packet)
   {
      LargeServerMessage largeMessage = storage.createLargeMessage();
      largeMessage.setDurable(true);
      largeMessage.setMessageID(packet.getMessageId());
      ReplicationEndpointImpl.trace("Receiving Large Message " + largeMessage.getMessageID() + " on backup");
      largeMessages.put(largeMessage.getMessageID(), largeMessage);
   }
View Full Code Here

      {
         for (PagedMessage msg : messages)
         {
            if (msg.getMessage().isLargeMessage())
            {
               LargeServerMessage lmsg = (LargeServerMessage)msg.getMessage();
              
               // Remember, cannot call delete directly here
               // Because the large-message may be linked to another message
               // or it may still being delivered even though it has been acked already
               lmsg.decrementDelayDeletionCount();
            }
         }
      }

      try
View Full Code Here

      }

      for (Pair<Long, Long> msgToDelete : pendingLargeMessages)
      {
         log.info("Deleting pending large message as it wasn't completed: LargeMessageID:" + msgToDelete.getB());
         LargeServerMessage msg = storageManager.createLargeMessage();
         msg.setMessageID(msgToDelete.getB());
         msg.setPendingRecordID(msgToDelete.getA());
         msg.setDurable(true);
         msg.deleteFile();
      }

      return journalInfo;
   }
View Full Code Here

   public void sendLarge(final MessageInternal message) throws Exception
   {
      // need to create the LargeMessage before continue
      long id = storageManager.generateUniqueID();

      LargeServerMessage largeMsg = storageManager.createLargeMessage(id, message);

      if (log.isTraceEnabled())
      {
         log.trace("sendLarge::" + largeMsg);
      }
View Full Code Here

      switch (rec)
      {
         case ADD_LARGE_MESSAGE:

            LargeServerMessage largeMessage = new LargeServerMessageImpl(null);

            LargeMessageEncoding messageEncoding = new LargeMessageEncoding(largeMessage);

            messageEncoding.decode(buffer);
View Full Code Here

               HornetQBuffer buff = HornetQBuffers.wrappedBuffer(data);

               try
               {
                  LargeServerMessage serverMessage = parseLargeMessage(messages, buff);
                  serverMessage.decrementDelayDeletionCount();
               }
               catch (Exception e)
               {
                  JournalStorageManager.log.warn(e.getMessage(), e);
               }
View Full Code Here

TOP

Related Classes of org.hornetq.core.server.LargeServerMessage

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.