Package net.timewalker.ffmq3.storage.data.impl

Examples of net.timewalker.ffmq3.storage.data.impl.InMemoryLinkedDataStore.store()


    for (int i = 0; i < 500; i++)
    {
      for (int j = 0; j < 10; j++)
      {
        int previous = store.first();
        previous = store.store(data, previous);
        if (previous == -1)
                  throw new IllegalStateException("No space left !");
      }
      store.commitChanges();
      for (int j = 0; j < 10; j++)
View Full Code Here


    for (int i = 0; i < 500; i++)
    {
      for (int j = 0; j < 10; j++)
      {
        int previous = store.first();
        previous = store.store(data, previous);
        if (previous == -1)
                  throw new IllegalStateException("No space left !");
      }
      //store.commitChanges();
      for (int j = 0; j < 10; j++)
View Full Code Here

    long startTime = System.currentTimeMillis();
    int previous = -1;
    for (int n = 0; n < msgCount; n++)
    {
      byte[] data = (msgBase + n).getBytes();
      previous = store.store(data, previous);
      if (previous == -1)
          throw new IllegalStateException("No space left !");
      // System.out.println(store);
    }
    store.commitChanges();
View Full Code Here

    int pos = -1;
    for (int n = 0; n < count; n++)
    {
      byte[] data = (msgBase + n).getBytes();
      previous = store.store(data, pos);
      if (previous == -1)
                throw new IllegalStateException("No space left !");
     
      pos = store.next(previous);
      if (pos != -1)
View Full Code Here

    for (int i = 0; i < 100; i++)
    {
      for (int j = 0; j < 10; j++)
      {
        int previous = store.first();
        previous = store.store(data, previous);
        if (previous == -1)
                  throw new IllegalStateException("No space left !");
      }
      store.commitChanges();
      for (int j = 0; j < 10; j++)
View Full Code Here

        assertEquals(0, store.size());
       
        int previous = -1;
        for (int n = 0 ; n < MSG_COUNT ; n++)
        {
            previous = store.store("test_"+n, previous);
            if (previous == -1)
                throw new IllegalStateException("No space left !");
        }
        assertEquals(MSG_COUNT, store.size());
        store.commitChanges();
View Full Code Here

        assertEquals(MSG_COUNT-count, store.size());
       
        int pos = -1;
        for(int n=0;n<count;n++)
        {
            previous = store.store("other_test_"+n, pos);
            if (previous == -1)
                throw new IllegalStateException("No space left !");
           
            pos = store.next(previous);
            if (pos != -1)
View Full Code Here

    for (int i = 0; i < msgCount; i++)
    {
      AbstractMessage msg = new TextMessageImpl("msg"+i);
      msg.setJMSMessageID("ID:FOO"+i);
      msg.setJMSPriority(rand.nextInt(10));
      assertTrue(msgStore.store(msg) != -1);
      //msgStore.commitChanges();
    }
    msgStore.commitChanges();
    long end = System.currentTimeMillis();
    System.out.println("testPriorityBasic: "+(end-start));
View Full Code Here

    for (int i = 0; i < msgCount/2; i++)
    {
      AbstractMessage msg = new TextMessageImpl("other_msg"+i);
      msg.setJMSMessageID("ID:BAR"+i);
      msg.setJMSPriority(rand.nextInt(10));
      assertTrue(msgStore.store(msg) != -1);
    }
    msgStore.commitChanges();
    assertEquals(msgCount, msgStore.size());
   
    System.out.println(msgStore);
View Full Code Here

    {   
      AbstractMessage msg = new TextMessageImpl("msg"+i);
      msg.setJMSMessageID("ID:FOO"+i);
      msg.setJMSPriority(i);
      msg.setJMSCorrelationID("ID"+i);
      msgStore.store(msg);
      msgStore.commitChanges();
    }
    assertEquals(10, msgStore.size());
   
    assertOrdered(msgStore);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.