Package org.springframework.integration.store

Examples of org.springframework.integration.store.MessageGroup


    store2.addMessageToGroup( 3, new GenericMessage<String>( "3A" ) );

    Iterator<MessageGroup> messageGroups = store1.iterator();
    int counter = 0;
    while ( messageGroups.hasNext() ) {
      final MessageGroup group = messageGroups.next();
      final String groupId = (String) group.getGroupId();
      if ( "1".equals( groupId ) ) {
        Assert.assertEquals( 1, group.getMessages().size() );
      }
      else if ( "2".equals( groupId ) ) {
        Assert.assertEquals( 1, group.getMessages().size() );
      }
      else if ( "3".equals( groupId ) ) {
        Assert.assertEquals( 2, group.getMessages().size() );
      }
      ++counter;
    }
    Assert.assertEquals( 3, counter );
View Full Code Here


    for ( int i = 0; i < 10; ++i ) {
      executor.execute( new Runnable() {
        public void run() {
          try {
            final Message<?> message = new GenericMessage<Object>( UUID.randomUUID() );
            MessageGroup group = store1.addMessageToGroup( 1, message );

            Thread.sleep( randomGenerator.nextInt( 100 ) );

            group = store2.removeMessageFromGroup( 1, message );
          }
View Full Code Here

*/
@SuppressWarnings("unchecked")
public class VoldemortMessageGroupStoreTest extends BaseStoreFunctionalTestCase {
  @Test
  public void testNonExistingEmptyMessageGroup() {
    final MessageGroup messageGroup = store.getMessageGroup( 1 );

    Assert.assertNotNull( messageGroup );
    Assert.assertTrue( messageGroup instanceof SimpleMessageGroup );
    Assert.assertEquals( 0, messageGroup.size() );
  }
View Full Code Here

TOP

Related Classes of org.springframework.integration.store.MessageGroup

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.