Java Code Examples for com.sleepycat.bind.tuple.TupleInput#readLong()

The following examples show how to use com.sleepycat.bind.tuple.TupleInput#readLong() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FieldTableEncoding.java    From qpid-broker-j with Apache License 2.0 6 votes vote down vote up
public static FieldTable readFieldTable(TupleInput tupleInput) throws DatabaseException
{

    long length = tupleInput.readLong();
    if (length <= 0)
    {
        return null;
    }
    else
    {

        ByteBuffer buf = ByteBufferBinding.getInstance().readByteBuffer(tupleInput, (int) length);

        return FieldTableFactory.createFieldTable(QpidByteBuffer.wrap(buf));

    }

}
 
Example 2
Source File: HierarchyKeyBinding.java    From qpid-broker-j with Apache License 2.0 5 votes vote down vote up
@Override
public HierarchyKey entryToObject(TupleInput tupleInput)
{
    UUID childId = new UUID(tupleInput.readLong(), tupleInput.readLong());
    String parentType = tupleInput.readString();

    return new HierarchyKey(childId, parentType);
}
 
Example 3
Source File: UpgradeFrom7To8Test.java    From qpid-broker-j with Apache License 2.0 5 votes vote down vote up
@Override
public UpgradeHierarchyKey entryToObject(TupleInput tupleInput)
{
    UUID childId = new UUID(tupleInput.readLong(), tupleInput.readLong());
    String parentType = tupleInput.readString();

    return new UpgradeHierarchyKey(childId, parentType);
}
 
Example 4
Source File: XidBinding.java    From qpid-broker-j with Apache License 2.0 5 votes vote down vote up
@Override
public Xid entryToObject(TupleInput input)
{
    long format = input.readLong();
    byte[] globalId = new byte[input.readInt()];
    input.readFast(globalId);
    byte[] branchId = new byte[input.readInt()];
    input.readFast(branchId);
    return new Xid(format,globalId,branchId);
}
 
Example 5
Source File: PreparedTransactionBinding.java    From qpid-broker-j with Apache License 2.0 5 votes vote down vote up
private static Transaction.DequeueRecord[] readDequeueRecords(final CachingUUIDFactory uuidFactory, TupleInput input)
{
    Transaction.DequeueRecord[] records = new Transaction.DequeueRecord[input.readInt()];
    for(int i = 0; i < records.length; i++)
    {
        UUID queueId = uuidFactory.createUuidFromBits(input.readLong(), input.readLong());
        records[i] = new DequeueRecordImpl(queueId, input.readLong());
    }
    return records;
}
 
Example 6
Source File: PreparedTransactionBinding.java    From qpid-broker-j with Apache License 2.0 5 votes vote down vote up
private static Transaction.EnqueueRecord[] readEnqueueRecords(final CachingUUIDFactory uuidFactory, TupleInput input)
{
    Transaction.EnqueueRecord[] records = new Transaction.EnqueueRecord[input.readInt()];
    for(int i = 0; i < records.length; i++)
    {
        UUID queueId = uuidFactory.createUuidFromBits(input.readLong(), input.readLong());
        records[i] = new EnqueueRecordImpl(queueId, input.readLong());
    }
    return records;
}
 
Example 7
Source File: UpgradeFrom4To5.java    From qpid-broker-j with Apache License 2.0 5 votes vote down vote up
@Override
public QueueEntryKey entryToObject(TupleInput tupleInput)
{
    AMQShortString queueName = AMQShortStringEncoding.readShortString(tupleInput);
    long messageId = tupleInput.readLong();
    return new QueueEntryKey(queueName, messageId);
}
 
Example 8
Source File: UpgradeFrom4To5.java    From qpid-broker-j with Apache License 2.0 5 votes vote down vote up
@Override
public MessageContentKey entryToObject(TupleInput tupleInput)
{
    long messageId = tupleInput.readLong();
    int chunk = tupleInput.readInt();
    return new MessageContentKey(messageId, chunk);
}
 
Example 9
Source File: UpgradeFrom5To6.java    From qpid-broker-j with Apache License 2.0 5 votes vote down vote up
private OldRecordImpl[] readRecords(TupleInput input)
{
    OldRecordImpl[] records = new OldRecordImpl[input.readInt()];
    for (int i = 0; i < records.length; i++)
    {
        records[i] = new OldRecordImpl(input.readString(), input.readLong());
    }
    return records;
}
 
Example 10
Source File: UpgradeFrom5To6.java    From qpid-broker-j with Apache License 2.0 5 votes vote down vote up
private NewRecordImpl[] readRecords(TupleInput input)
{
    NewRecordImpl[] records = new NewRecordImpl[input.readInt()];
    for (int i = 0; i < records.length; i++)
    {
        records[i] = new NewRecordImpl(new UUID(input.readLong(), input.readLong()), input.readLong());
    }
    return records;
}
 
Example 11
Source File: UpgradeFrom5To6.java    From qpid-broker-j with Apache License 2.0 5 votes vote down vote up
@Override
public NewQueueEntryKey entryToObject(TupleInput tupleInput)
{
    UUID queueId = new UUID(tupleInput.readLong(), tupleInput.readLong());
    long messageId = tupleInput.readLong();

    return new NewQueueEntryKey(queueId, messageId);
}
 
Example 12
Source File: UpgradeFrom5To6.java    From qpid-broker-j with Apache License 2.0 5 votes vote down vote up
@Override
public OldQueueEntryKey entryToObject(TupleInput tupleInput)
{
    AMQShortString queueName = AMQShortStringEncoding.readShortString(tupleInput);
    long messageId = tupleInput.readLong();

    return new OldQueueEntryKey(queueName, messageId);
}
 
Example 13
Source File: UpgradeFrom5To6.java    From qpid-broker-j with Apache License 2.0 4 votes vote down vote up
@Override
public CompoundKey entryToObject(final TupleInput input)
{
    return new CompoundKey(input.readLong(), input.readInt());
}
 
Example 14
Source File: UUIDTupleBinding.java    From qpid-broker-j with Apache License 2.0 4 votes vote down vote up
@Override
public UUID entryToObject(final TupleInput tupleInput)
{
    return new UUID(tupleInput.readLong(), tupleInput.readLong());
}
 
Example 15
Source File: OrphanConfigurationRecordPurger.java    From qpid-broker-j with Apache License 2.0 4 votes vote down vote up
private UUID entryToUuid(final TupleInput input)
{
    final long mostSigBits = input.readLong();
    final long leastSigBits = input.readLong();
    return new UUID(mostSigBits, leastSigBits);
}
 
Example 16
Source File: UpgradeFrom7To8Test.java    From qpid-broker-j with Apache License 2.0 4 votes vote down vote up
@Override
public UUID entryToObject(final TupleInput tupleInput)
{
    return new UUID(tupleInput.readLong(), tupleInput.readLong());
}
 
Example 17
Source File: UpgradeFrom5To6.java    From qpid-broker-j with Apache License 2.0 4 votes vote down vote up
@Override
public UUID entryToObject(final TupleInput tupleInput)
{
    return new UUID(tupleInput.readLong(), tupleInput.readLong());
}