Examples of MessageStore


Examples of com.alibaba.rocketmq.store.MessageStore

            msgInner.setStoreTimestamp(msgExt.getStoreTimestamp());
            if (MessageSysFlag.TransactionRollbackType == requestHeader.getCommitOrRollback()) {
                msgInner.setBody(null);
            }

            final MessageStore messageStore = this.brokerController.getMessageStore();
            final PutMessageResult putMessageResult = messageStore.putMessage(msgInner);
            if (putMessageResult != null) {
                switch (putMessageResult.getPutMessageStatus()) {
                // Success
                case PUT_OK:
                case FLUSH_DISK_TIMEOUT:

Examples of com.linyan.model.MessageStore

*/
public class HelloWorldAction extends ActionSupport{
    private static final long serialVersionUID = 1L;
    private MessageStore messageStore;
    public String excute(){
        messageStore = new MessageStore();
        return SUCCESS;
    }

Examples of com.stimulus.archiva.store.MessageStore

  }
 
  protected static synchronized void initMessageStore() {
      try {
        if (messageStore==null)
            messageStore = new MessageStore();
      } catch (MessageStoreException ms) {
          throw new ChainedRuntimeException(ms.toString(),ms,logger);
      }
  }

Examples of com.taobao.metamorphosis.client.extension.storage.MessageStore

    }


    @Override
    protected Store newStore(final String name) throws IOException {
        return new MessageStore(META_LOCALMESSAGE_PATH + File.separator + name, name);
    }

Examples of com.taobao.metamorphosis.server.store.MessageStore

public class JournalTransactionStoreUnitTest extends BaseTransactionUnitTest {

    @Test
    public void testAddAddRollBackCloseRecover() throws Exception {
        final LocalTransactionId xid = new LocalTransactionId("test", 1);
        final MessageStore store = this.messageStoreManager.getOrCreateMessageStore("topic1", 2);
        this.transactionStore.addMessage(store, 1, new PutCommand("topic1", 2, "msg1".getBytes(), xid, 0, 1), null);
        this.transactionStore.addMessage(store, 1, new PutCommand("topic1", 2, "msg2".getBytes(), xid, 0, 2), null);

        final Tx tx = this.transactionStore.getInflyTx(xid);
        assertNotNull(tx);
        final PutCommand[] commands = tx.getRequests();
        assertNotNull(commands);
        assertEquals(2, commands.length);
        store.flush();
        // ��û��д��
        assertEquals(0, store.getSizeInBytes());

        // rollback
        this.transactionStore.rollback(xid);
        assertNull(this.transactionStore.getInflyTx(xid));
        store.flush();
        // �ع�����Ȼû��д��
        assertEquals(0, store.getSizeInBytes());

        this.tearDown();
        this.init(this.path);
        assertTrue(this.journalStore.getCurrDataFile().getLength() > 0);
        assertNull(this.transactionStore.getInflyTx(xid));

Examples of hermes.store.MessageStore

         throw new BuildException("storeId not set");
      }

      final Hermes myHermes;
      final Destination toDestination;
      final MessageStore messageStore;

      try
      {
         myHermes = HermesFactory.createHermes(getConfig(), getHermes());

         if (queue != null || topic != null)
         {
            final Domain domain = queue != null ? Domain.QUEUE : Domain.TOPIC;
            final String destinationName = queue != null ? queue : topic;

            toDestination = myHermes.getDestination(destinationName, domain);
         }
         else
         {
            toDestination = null;
         }

         messageStore = jdbcURL == null ? MessageStoreManager.create(storeId) : MessageStoreManager.create(jdbcURL, storeId);
      }
      catch (Exception e)
      {
         throw new BuildException(e);
      }

      try
      {
         if (storeDestinations.size() == 0)
         {
            if (toDestination == null)
            {
               log("Replaying all messages from store " + messageStore.getId() + " to " + myHermes.getId());

            }
            doReplay(messageStore, myHermes, toDestination);
         }
         else

Examples of net.timewalker.ffmq3.storage.message.MessageStore

      fail("Not ordered !");
  }
 
  public void testPriorityBasic() throws Exception
  {
    MessageStore msgStore = createMessageStore();
   
    Random rand = new Random(System.currentTimeMillis());
   
    long start = System.currentTimeMillis();
    int msgCount = 178;
    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));
    assertEquals(msgCount, msgStore.size());
   
    assertOrdered(msgStore);
   
    // Delete half the queue
    int count = 0;
    int current = msgStore.first();
    while (current != -1 && count < (msgCount/2))
    {
      int next = msgStore.next(current);
      msgStore.delete(current);
      count++;
      current = next;
    }
    msgStore.commitChanges();
    assertEquals(msgCount/2, msgStore.size());
   
    assertOrdered(msgStore);
   
    //System.out.println(msgStore.toString());
   
    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);
    assertOrdered(msgStore);
   
    msgStore.close();
  }

Examples of org.activemq.store.MessageStore

    }

    public MessageStore createQueueMessageStore(String destinationName) throws JMSException {
        JournalMessageStore store = (JournalMessageStore) messageStores.get(destinationName);
        if( store == null ) {
          MessageStore checkpointStore = longTermPersistence.createQueueMessageStore(destinationName);
          store = new JournalMessageStore(this, checkpointStore, destinationName);
          messageStores.put(destinationName, store);
        }
        return store;
    }

Examples of org.apache.activemq.store.MessageStore

    }

    public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException {
        JournalMessageStore store = queues.get(destination);
        if (store == null) {
            MessageStore checkpointStore = longTermPersistence.createQueueMessageStore(destination);
            store = new JournalMessageStore(this, checkpointStore, destination);
            queues.put(destination, store);
        }
        return store;
    }

Examples of org.apache.activemq.store.MessageStore

        }
        return rc;
    }

    public synchronized MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException {
        MessageStore rc = queues.get(destination);
        if (rc == null) {
            rc = new KahaMessageStore(getMapContainer(destination, "queue-data"), destination);
            messageStores.put(destination, rc);
            if (transactionStore != null) {
                rc = transactionStore.proxy(rc);
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.