Value key = new Value(CollectionStore.FREE_COLLECTION_ID_KEY);
Value key = new CollectionStore.CollectionKey(CollectionStore.FREE_COLLECTION_ID_KEY);
    public short getFreeCollectionId(Txn transaction) throws ReadOnlyException {        short freeCollectionId = Collection.UNKNOWN_COLLECTION_ID;              Lock lock = collectionsDb.getLock();        try {            lock.acquire(Lock.WRITE_LOCK);            Value key = new Value(CollectionStore.FREE_COLLECTION_ID_KEY);            Value value = collectionsDb.get(key);            if (value != null) {                byte[] data = value.getData();                freeCollectionId = ByteConversion.byteToShort(data, data.length - 2);//              LOG.debug("reusing collection id: " + freeCollectionId);                if(data.length - 2 > 0) {                    byte[] ndata = new byte[data.length - 2];                    System.arraycopy(data, 0, ndata, 0, ndata.length);                    collectionsDb.put(transaction, key, ndata, true);                } else                    collectionsDb.remove(transaction, key);            }            return freeCollectionId;        } 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();        }    }