| | |
| | | */ |
| | | void put(final WriteableTransaction txn, DN dn, final EntryID entryID) throws StorageRuntimeException |
| | | { |
| | | txn.put(getName(), toKey(dn), entryID.toByteString()); |
| | | txn.put(getName(), toKey(dn), toValue(entryID)); |
| | | } |
| | | |
| | | boolean insert(final WriteableTransaction txn, DN dn, final EntryID entryID) throws StorageRuntimeException |
| | |
| | | return oldEntryID; |
| | | } |
| | | // it did not exist before, insert the new value |
| | | return entryID.toByteString(); |
| | | return toValue(entryID); |
| | | } |
| | | }); |
| | | } |
| | |
| | | return dnToDNKey(dn, baseDN.size()); |
| | | } |
| | | |
| | | ByteString toValue(final EntryID entryID) |
| | | { |
| | | // TODO JNR do we want to use compacted longs? |
| | | return entryID.toByteString(); |
| | | } |
| | | |
| | | /** |
| | | * Remove a record from the DN tree. |
| | | * @param txn a non null transaction |