use of org.apache.qpid.server.store.berkeleydb.tuple.ByteBufferBinding in project qpid-broker-j by apache.
the class UpgraderTest method assertContent.
private void assertContent() {
final ByteBufferBinding contentBinding = ByteBufferBinding.getInstance();
CursorOperation contentCursorOperation = new CursorOperation() {
@Override
public void processEntry(Database sourceDatabase, Database targetDatabase, Transaction transaction, DatabaseEntry key, DatabaseEntry value) {
long id = LongBinding.entryToLong(key);
assertTrue("Unexpected id", id > 0);
QpidByteBuffer content = contentBinding.entryToObject(value);
assertNotNull("Unexpected content", content);
assertTrue("Expected content", content.hasRemaining());
}
};
new DatabaseTemplate(_environment, "MESSAGE_CONTENT", null).run(contentCursorOperation);
}
Aggregations