Package org.apache.qpid.server.store.berkeleydb.tuples

Examples of org.apache.qpid.server.store.berkeleydb.tuples.MessageContentKeyTB_5.objectToEntry()


            DatabaseEntry contentKeyEntry = new DatabaseEntry();
            MessageContentKey_5 mck = new MessageContentKey_5(messageId,0);

            TupleBinding<MessageContentKey> contentKeyTupleBinding = new MessageContentKeyTB_5();
            contentKeyTupleBinding.objectToEntry(mck, contentKeyEntry);

            //Use a partial record for the value to prevent retrieving the
            //data itself as we only need the key to identify what to remove.
            DatabaseEntry value = new DatabaseEntry();
            value.setPartial(0, 0, true);
View Full Code Here


    protected void addContent(final com.sleepycat.je.Transaction tx, Long messageId, int offset,
                                      ByteBuffer contentBody) throws AMQStoreException
    {
        DatabaseEntry key = new DatabaseEntry();
        TupleBinding<MessageContentKey> keyBinding = new MessageContentKeyTB_5();
        keyBinding.objectToEntry(new MessageContentKey_5(messageId, offset), key);
        DatabaseEntry value = new DatabaseEntry();
        TupleBinding<ByteBuffer> messageBinding = new ContentTB();
        messageBinding.objectToEntry(contentBody, value);
        try
        {
View Full Code Here

        DatabaseEntry contentKeyEntry = new DatabaseEntry();
       
        //Start from 0 offset and search for the starting chunk.
        MessageContentKey_5 mck = new MessageContentKey_5(messageId, 0);
        TupleBinding<MessageContentKey> contentKeyTupleBinding = new MessageContentKeyTB_5();
        contentKeyTupleBinding.objectToEntry(mck, contentKeyEntry);
        DatabaseEntry value = new DatabaseEntry();
        TupleBinding<ByteBuffer> contentTupleBinding = new ContentTB();
       
        if (_log.isDebugEnabled())
        {
View Full Code Here

                int contentSize = content.limit();

                //create the new key: id + previously seen data count
                MessageContentKey_5 newKey = new MessageContentKey_5(msgId, _bytesSeenSoFar);
                DatabaseEntry newKeyEntry = new DatabaseEntry();
                newContentKeyTupleBinding.objectToEntry(newKey, newKeyEntry);

                DatabaseEntry newValueEntry = new DatabaseEntry();
                contentTB.objectToEntry(content, newValueEntry);

                newContentDB.put(null, newKeyEntry, newValueEntry);
View Full Code Here

                    do
                    {
                        DatabaseEntry contentKeyEntry = new DatabaseEntry();
                        MessageContentKey_5 mck = new MessageContentKey_5(messageId,offset);
                        TupleBinding<MessageContentKey> contentKeyTupleBinding = new MessageContentKeyTB_5();
                        contentKeyTupleBinding.objectToEntry(mck, contentKeyEntry);
                        //Use a partial record for the value to prevent retrieving the
                        //data itself as we only need the key to identify what to remove.
                        DatabaseEntry value = new DatabaseEntry();
                        value.setPartial(0, 4, true);
View Full Code Here

    protected void addContent(final com.sleepycat.je.Transaction tx, long messageId, int offset,
                                      ByteBuffer contentBody) throws AMQStoreException
    {
        DatabaseEntry key = new DatabaseEntry();
        TupleBinding<MessageContentKey> keyBinding = new MessageContentKeyTB_5();
        keyBinding.objectToEntry(new MessageContentKey_5(messageId, offset), key);
        DatabaseEntry value = new DatabaseEntry();
        TupleBinding<ByteBuffer> messageBinding = new ContentTB();
        messageBinding.objectToEntry(contentBody, value);
        try
        {
View Full Code Here

        DatabaseEntry contentKeyEntry = new DatabaseEntry();

        //Start from 0 offset and search for the starting chunk.
        MessageContentKey_5 mck = new MessageContentKey_5(messageId, 0);
        TupleBinding<MessageContentKey> contentKeyTupleBinding = new MessageContentKeyTB_5();
        contentKeyTupleBinding.objectToEntry(mck, contentKeyEntry);
        DatabaseEntry value = new DatabaseEntry();
        TupleBinding<ByteBuffer> contentTupleBinding = new ContentTB();

        if (_log.isDebugEnabled())
        {
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.