use of org.apache.qpid.server.store.berkeleydb.upgrade.UpgradeFrom5To6.OldRecordImpl in project qpid-broker-j by apache.
the class UpgradeFrom5To6Test method populateOldXidEntries.
private void populateOldXidEntries(Environment environment) {
final DatabaseEntry value = new DatabaseEntry();
OldRecordImpl[] enqueues = { new OldRecordImpl("TEST1", 1) };
OldRecordImpl[] dequeues = { new OldRecordImpl("TEST2", 2) };
OldPreparedTransaction oldPreparedTransaction = new OldPreparedTransaction(enqueues, dequeues);
OldPreparedTransactionBinding oldPreparedTransactionBinding = new OldPreparedTransactionBinding();
oldPreparedTransactionBinding.objectToEntry(oldPreparedTransaction, value);
final DatabaseEntry key = getXidKey();
new DatabaseTemplate(environment, OLD_XID_DB_NAME, null).run(new DatabaseRunnable() {
@Override
public void run(Database xidDatabase, Database nullDatabase, Transaction transaction) {
xidDatabase.put(null, key, value);
}
});
}
Aggregations