Value key = new Value(CollectionStore.NEXT_COLLECTION_ID_KEY);
Value key = new CollectionStore.CollectionKey(CollectionStore.NEXT_COLLECTION_ID_KEY);
    public short getNextCollectionId(Txn transaction) throws ReadOnlyException {                short nextCollectionId = getFreeCollectionId(transaction);                if(nextCollectionId != Collection.UNKNOWN_COLLECTION_ID)            return nextCollectionId;                        Lock lock = collectionsDb.getLock();        try {            lock.acquire(Lock.WRITE_LOCK);            Value key = new Value(CollectionStore.NEXT_COLLECTION_ID_KEY);            Value data = collectionsDb.get(key);            if (data != null) {                nextCollectionId = ByteConversion.byteToShort(data.getData(), 0);                ++nextCollectionId;            }            byte[] d = new byte[2];            ByteConversion.shortToByte(nextCollectionId, d, 0);            collectionsDb.put(transaction, key, d, true);            return nextCollectionId;        } catch (LockException e) {            LOG.warn("Failed to acquire lock on " + collectionsDb.getFile().getName(), e);            return Collection.UNKNOWN_COLLECTION_ID;            //TODO : rethrow ? -pb        } finally {            lock.release();        }           }