Package org.hornetq.core.persistence.impl.journal

Examples of org.hornetq.core.persistence.impl.journal.OperationContextImpl$TaskHolder


               while (running.get())
               {
                  final long[] values = new long[100];
                  long tx = seqGenerator.incrementAndGet();

                  OperationContextImpl ctx = new OperationContextImpl(executor);
                  storage.setContext(ctx);

                  for (int i = 0; i < 100; i++)
                  {
                     long id = seqGenerator.incrementAndGet();
                     values[i] = id;

                     ServerMessageImpl message = new ServerMessageImpl(id, 100);

                     message.getBodyBuffer().writeBytes(new byte[1024]);

                     storage.storeMessageTransactional(tx, message);
                  }
                  ServerMessageImpl message = new ServerMessageImpl(seqGenerator.incrementAndGet(), 100);

                  survivingMsgs.add(message.getMessageID());

                  // This one will stay here forever
                  storage.storeMessage(message);

                  storage.commit(tx);

                  ctx.executeOnCompletion(new IOAsyncTask()
                  {
                     public void onError(int errorCode, String errorMessage)
                     {
                     }
View Full Code Here

TOP

Related Classes of org.hornetq.core.persistence.impl.journal.OperationContextImpl$TaskHolder

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.