Package org.jboss.jms.delegate

Examples of org.jboss.jms.delegate.IDBlock


           
      long nextLow = Long.MIN_VALUE;
     
      for (int i = 0; i < 1000; i++)
      {
         IDBlock block = idm.getIDBlock(blockSize);
                  
         assertTrue(block.getLow() >= nextLow);
        
         assertEquals(blockSize, 1 + block.getHigh() - block.getLow());
        
         nextLow = block.getHigh() + 1;        
      }
     
      idm.stop();
   }
View Full Code Here


      os.flush();
   }
  
   public void read(DataInputStream is) throws Exception
   {
      idBlock = new IDBlock();
     
      idBlock.read(is);
   }
View Full Code Here

           
      long nextLow = Long.MIN_VALUE;
     
      for (int i = 0; i < 1000; i++)
      {
         IDBlock block = idm.getIDBlock(blockSize);
                  
         assertTrue(block.getLow() >= nextLow);
        
         assertEquals(blockSize, 1 + block.getHigh() - block.getLow());
        
         nextLow = block.getHigh() + 1;        
      }
     
      idm.stop();
   }
View Full Code Here

      long low = this.low;

      this.low += size;

      return new IDBlock(low, this.low - 1);
   }
View Full Code Here

         testPacket(resp, PacketSupport.RESP_CONNECTIONFACTORY_CREATECONNECTIONDELEGATE);                          
      }
     
      public void testConnectionFactoryGetIDBlockResponse() throws Exception
      {
         IDBlock block = new IDBlock(1, 76);
        
         ResponseSupport resp =
            new ConnectionGetIDBlockResponse(block);
                
         testPacket(resp, PacketSupport.RESP_CONNECTIONFACTORY_GETIDBLOCK);                          
View Full Code Here

   // Public --------------------------------------------------------

   protected void getNextBlock(ConnectionEndpoint connection) throws JMSException
   {
      IDBlock block = connection.getIdBlock(blockSize);

      nextID = block.getLow();
      high = block.getHigh();

      if (trace) { log.trace("Got block of IDs from server, low=" + nextID + " high=" + high); }
   }
View Full Code Here

         testPacket(resp, PacketSupport.RESP_CONNECTIONFACTORY_CREATECONNECTIONDELEGATE);                          
      }
     
      public void testConnectionFactoryGetIDBlockResponse() throws Exception
      {
         IDBlock block = new IDBlock(1, 76);
        
         ResponseSupport resp =
            new ConnectionGetIDBlockResponse(block);
                
         testPacket(resp, PacketSupport.RESP_CONNECTIONFACTORY_GETIDBLOCK);                          
View Full Code Here

           
      long nextLow = Long.MIN_VALUE;
     
      for (int i = 0; i < 1000; i++)
      {
         IDBlock block = idm.getIDBlock(blockSize);
                  
         assertTrue(block.getLow() >= nextLow);
        
         assertEquals(blockSize, 1 + block.getHigh() - block.getLow());
        
         nextLow = block.getHigh() + 1;        
      }
     
      idm.stop();
   }
View Full Code Here

/*     */
/* 114 */     long low = this.low;
/*     */
/* 116 */     this.low += size;
/*     */
/* 118 */     return new IDBlock(low, this.low - 1L);
/*     */   }
View Full Code Here

/*    */   }
/*    */
/*    */   protected void getNextBlock(ConnectionEndpoint connection)
/*    */     throws JMSException
/*    */   {
/* 67 */     IDBlock block = connection.getIdBlock(this.blockSize);
/*    */
/* 69 */     this.nextID = block.getLow();
/* 70 */     this.high = block.getHigh();
/*    */
/* 72 */     if (this.trace) log.trace("Got block of IDs from server, low=" + this.nextID + " high=" + this.high);
/*    */   }
View Full Code Here

TOP

Related Classes of org.jboss.jms.delegate.IDBlock

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.