Examples of MessageSet


Examples of com.atlassian.jira.util.MessageSet

                }
                qfMgr.setLinkerFieldOptions(cfId, prId, optList);
            }
            else
            {
                MessageSet ms = parseResult.getErrors();
                Set<String> errs = ms.getErrorMessages();
                Map<String, Object> params = new HashMap<String, Object>();
                params.put("errs", errs);
                params.put("i18n", i18n);

                try
View Full Code Here

Examples of com.google.code.com.sun.mail.imap.protocol.MessageSet

      current = msg.getSequenceNumber();
      // Apply the condition. If it fails, skip it.
      if ((cond != null) && !cond.test(msg))
    continue;
     
      MessageSet set = new MessageSet();
      set.start = current;

      // Look for contiguous sequence numbers
      for (++i; i < msgs.length; i++) {
    // get next message
View Full Code Here

Examples of com.sun.mail.imap.protocol.MessageSet

      current = msg.getSequenceNumber();
      // Apply the condition. If it fails, skip it.
      if ((cond != null) && !cond.test(msg))
    continue;
     
      MessageSet set = new MessageSet();
      set.start = current;

      // Look for contiguous sequence numbers
      for (++i; i < msgs.length; i++) {
    // get next message
View Full Code Here

Examples of com.sun.mail.imap.protocol.MessageSet

      current = msg.getSequenceNumber();
      // Apply the condition. If it fails, skip it.
      if ((cond != null) && !cond.test(msg))
    continue;
     
      MessageSet set = new MessageSet();
      set.start = current;

      // Look for contiguous sequence numbers
      for (++i; i < msgs.length; i++) {
    // get next message
View Full Code Here

Examples of com.sun.mail.imap.protocol.MessageSet

      current = msg.getSequenceNumber();
      // Apply the condition. If it fails, skip it.
      if ((cond != null) && !cond.test(msg))
    continue;
     
      MessageSet set = new MessageSet();
      set.start = current;

      // Look for contiguous sequence numbers
      for (++i; i < msgs.length; i++) {
    // get next message
View Full Code Here

Examples of com.sun.mail.imap.protocol.MessageSet

      current = msg.getSequenceNumber();
      // Apply the condition. If it fails, skip it.
      if ((cond != null) && !cond.test(msg))
    continue;
     
      MessageSet set = new MessageSet();
      set.start = current;

      // Look for contiguous sequence numbers
      for (++i; i < msgs.length; i++) {
    // get next message
View Full Code Here

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

        final int opaque = 0;
        final int maxSize = 1024;
        final long offset = 10;
        final MessageStore store = this.mocksControl.createMock(MessageStore.class);
        EasyMock.expect(this.storeManager.getMessageStore(this.topic, partition)).andReturn(store);
        final MessageSet set = this.mocksControl.createMock(MessageSet.class);
        EasyMock.expect(store.slice(offset, maxSize)).andReturn(set);
        final GetCommand request = new GetCommand(this.topic, this.group, partition, offset, maxSize, opaque);
        set.write(request, this.sessionContext);
        EasyMock.expectLastCall();
        this.mocksControl.replay();

        this.getProcessor.handleRequest(request, this.conn);
        this.mocksControl.verify();
View Full Code Here

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

        final ByteBuffer msgBuf =
                MessageUtils.makeMessageBuffer(999, new PutCommand(this.topic, partition, "hello world".getBytes(),
                    null, 0, opaque));
        final MessageStore store = this.mocksControl.createMock(MessageStore.class);
        EasyMock.expect(this.storeManager.getMessageStore(this.topic, partition)).andReturn(store);
        final MessageSet set = this.mocksControl.createMock(MessageSet.class);
        EasyMock.expect(store.slice(offset, maxSize)).andReturn(set);
        final GetCommand request = new GetCommand(this.topic, this.group, partition, offset, maxSize, opaque);
        set.read((ByteBuffer) EasyMock.anyObject());
        EasyMock.expectLastCall().andAnswer(new IAnswer<Void>() {

            @Override
            public Void answer() throws Throwable {
                final Object[] args = EasyMock.getCurrentArguments();
View Full Code Here

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

        final ByteBuffer msgBuf =
                MessageUtils.makeMessageBuffer(999, new PutCommand(this.topic, partition, "hello world".getBytes(),
                    null, 0, opaque));
        final MessageStore store = this.mocksControl.createMock(MessageStore.class);
        EasyMock.expect(this.storeManager.getMessageStore(this.topic, partition)).andReturn(store);
        final MessageSet set = this.mocksControl.createMock(MessageSet.class);
        EasyMock.expect(store.slice(offset, maxSize)).andReturn(set);
        final GetCommand request = new GetCommand(this.topic, this.group, partition, offset, maxSize, opaque);
        set.read((ByteBuffer) EasyMock.anyObject());
        EasyMock.expectLastCall().andAnswer(new IAnswer<Void>() {

            @Override
            public Void answer() throws Throwable {
                final Object[] args = EasyMock.getCurrentArguments();
View Full Code Here

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

        if (request.getMaxSize() <= 0) {
            return new BooleanCommand(HttpStatus.BadRequest, "Bad request,invalid max size:" + request.getMaxSize(),
                request.getOpaque());
        }
        try {
            final MessageSet set =
                    store.slice(request.getOffset(),
                        Math.min(this.metaConfig.getMaxTransferSize(), request.getMaxSize()));
            ConsumerMessageFilter filter = this.consumerFilterManager.findFilter(topic, group);
            if (set != null) {
                if (zeroCopy && filter == null) {
                    set.write(request, ctx);
                    return null;
                }
                else {
                    // refer to the code of line 440 in MessageStore
                    // create two copies of byte array including the byteBuffer
                    // and new bytes
                    // this may not a good use case of Buffer
                    final ByteBuffer byteBuffer =
                            ByteBuffer.allocate(Math.min(this.metaConfig.getMaxTransferSize(), request.getMaxSize()));
                    set.read(byteBuffer);
                    byte[] bytes = this.getBytesFromBuffer(byteBuffer);
                    // If filter is not null,we filter the messages by it.
                    if (filter != null) {
                        MessageIterator it = new MessageIterator(topic, bytes);
                        // reuse the buffer.
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.