Value key = new Value(CollectionStore.FREE_DOC_ID_KEY);
Value key = new CollectionStore.CollectionKey(CollectionStore.FREE_DOC_ID_KEY);
	protected void freeResourceId(Txn transaction, int id) throws PermissionDeniedException {				Lock lock = collectionsDb.getLock();		try {			lock.acquire(Lock.WRITE_LOCK);            Value key = new Value(CollectionStore.FREE_DOC_ID_KEY);			Value value = collectionsDb.get(key);			if (value != null) {                byte[] data = value.getData();				byte[] ndata = new byte[data.length + 4];				System.arraycopy(data, 0, ndata, 4, data.length);				ByteConversion.intToByte(id, ndata, 0);				collectionsDb.put(transaction, key, ndata, true);			} else {				byte[] data = new byte[4];				ByteConversion.intToByte(id, data, 0);				collectionsDb.put(transaction, key, data, true);			}		} catch (LockException e) {			LOG.warn("Failed to acquire lock on " + collectionsDb.getFile().getName(), e);            //TODO : rethrow ? -pb		} catch (ReadOnlyException e) {		    throw new PermissionDeniedException(DATABASE_IS_READ_ONLY);        } finally {			lock.release();		}	}