Examples of PutCommand


Examples of com.taobao.metamorphosis.network.PutCommand

                for (int j = 0; j < rand.nextInt(3) + 1; j++) {
                    final int partition = rand.nextInt(10);
                    final MessageStore store =
                            this.messageStoreManager.getOrCreateMessageStore("topic1", partition % 10);
                    this.transactionStore.addMessage(store, 1,
                        new PutCommand("topic1", partition, ("msg" + i).getBytes(), xid, 0, 1), null);
                }
                // commit
                this.transactionStore.commit(xid, false);

            }
View Full Code Here

Examples of com.taobao.metamorphosis.network.PutCommand

            // �漴��Ӽ�����Ϣ
            for (int j = 0; j < rand.nextInt(3) + 1; j++) {
                final int partition = rand.nextInt(10);
                final MessageStore store = this.messageStoreManager.getOrCreateMessageStore("topic1", partition % 10);
                this.transactionStore.addMessage(store, 1, new PutCommand("topic1", partition, ("msg" + i).getBytes(),
                    xid, 0, 1), null);
            }
            if (i % 100 == 0) {
                this.journalStore.checkpoint();
            }
View Full Code Here

Examples of com.taobao.metamorphosis.network.PutCommand

    @Test
    public void testAddAddCommit_CloseReplayAppend_CloseRecover() throws Exception {
        final LocalTransactionId xid = new LocalTransactionId("test", 1);
        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);
        assertNotNull(this.transactionStore.getInflyTx(xid));

        // commit
        this.transactionStore.commit(xid, false);
        store.flush();
View Full Code Here

Examples of org.apache.camel.component.beanstalk.processors.PutCommand

     */
    @Override
    public Producer createProducer() throws Exception {
        Command cmd;
        if (BeanstalkComponent.COMMAND_PUT.equals(command)) {
            cmd = new PutCommand(this);
        } else if (BeanstalkComponent.COMMAND_RELEASE.equals(command)) {
            cmd = new ReleaseCommand(this);
        } else if (BeanstalkComponent.COMMAND_BURY.equals(command)) {
            cmd = new BuryCommand(this);
        } else if (BeanstalkComponent.COMMAND_TOUCH.equals(command)) {
View Full Code Here

Examples of org.exoplatform.services.jcr.webdav.command.PutCommand

         String contentNodeType = NodeTypeUtil.getContentNodeType(contentNodeTypeHeader);
         NodeTypeManager ntm = session.getWorkspace().getNodeTypeManager();
         NodeType nodeType = ntm.getNodeType(contentNodeType);
         NodeTypeUtil.checkContentResourceType(nodeType);

         return new PutCommand(nullResourceLocks).put(session, path(repoPath), inputStream, fileNodeType,
            contentNodeType, NodeTypeUtil.getMixinTypes(mixinTypes), mimeType, encoding, updatePolicyType,
            autoVersionType, tokens);

      }
      catch (NoSuchWorkspaceException exc)
View Full Code Here

Examples of org.exoplatform.services.jcr.webdav.command.PutCommand

         String contentNodeType = NodeTypeUtil.getContentNodeType(contentNodeTypeHeader);
         NodeTypeManager ntm = session.getWorkspace().getNodeTypeManager();
         NodeType nodeType = ntm.getNodeType(contentNodeType);
         NodeTypeUtil.checkContentResourceType(nodeType);

         return new PutCommand(nullResourceLocks, uriInfo.getBaseUriBuilder().path(getClass()).path(repoName)).put(
            session, path(repoPath), inputStream, fileNodeType, contentNodeType,
            NodeTypeUtil.getMixinTypes(mixinTypes), mimeType, encoding, updatePolicyType, autoVersionType, tokens);

      }
      catch (NoSuchWorkspaceException exc)
View Full Code Here

Examples of org.exoplatform.services.jcr.webdav.command.PutCommand

         String contentNodeType = NodeTypeUtil.getContentNodeType(contentNodeTypeHeader);
         NodeTypeManager ntm = session.getWorkspace().getNodeTypeManager();
         NodeType nodeType = ntm.getNodeType(contentNodeType);
         NodeTypeUtil.checkContentResourceType(nodeType);

         return new PutCommand(nullResourceLocks, uriInfo.getBaseUriBuilder().path(getClass()).path(repoName),
            mimeTypeRecognizer).put(session, path(repoPath), inputStream, fileNodeType, contentNodeType,
            NodeTypeUtil.getMixinTypes(mixinTypes), updatePolicyType, autoVersionType, tokens);

      }
      catch (NoSuchWorkspaceException exc)
View Full Code Here

Examples of org.exoplatform.services.jcr.webdav.command.PutCommand

         String contentNodeType = NodeTypeUtil.getContentNodeType(contentNodeTypeHeader);
         NodeTypeManager ntm = session.getWorkspace().getNodeTypeManager();
         NodeType nodeType = ntm.getNodeType(contentNodeType);
         NodeTypeUtil.checkContentResourceType(nodeType);

         return new PutCommand(nullResourceLocks).put(session, path(repoPath), inputStream, fileNodeType,
            contentNodeType, NodeTypeUtil.getMixinTypes(mixinTypes), mimeType, encoding, updatePolicyType,
            autoVersionType, tokens);

      }
      catch (NoSuchWorkspaceException exc)
View Full Code Here

Examples of org.exoplatform.services.jcr.webdav.command.PutCommand

            MimeTypeResolver mimeTypeResolver = new MimeTypeResolver();
            mimeTypeResolver.setDefaultMimeType(defaultFileMimeType);
            mimeType = mimeTypeResolver.getMimeType(TextUtil.nameOnly(repoPath));
         }

         return new PutCommand(nullResourceLocks).put(session, path(repoPath), inputStream, fileNodeType,
            contentNodeType, NodeTypeUtil.getMixinTypes(mixinTypes), mimeType, updatePolicyType, tokens);

      }
      catch (NoSuchWorkspaceException exc)
      {
View Full Code Here

Examples of org.exoplatform.services.jcr.webdav.command.PutCommand

         String contentNodeType = NodeTypeUtil.getContentNodeType(contentNodeTypeHeader);
         NodeTypeManager ntm = session.getWorkspace().getNodeTypeManager();
         NodeType nodeType = ntm.getNodeType(contentNodeType);
         NodeTypeUtil.checkContentResourceType(nodeType);

         return new PutCommand(nullResourceLocks).put(session, path(repoPath), inputStream, fileNodeType,
            contentNodeType, NodeTypeUtil.getMixinTypes(mixinTypes), mimeType, encoding, updatePolicyType,
            autoVersionType, tokens);

      }
      catch (NoSuchWorkspaceException exc)
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.