class PersistentMap implements Map<K, V> {

    @Override
    public V put(K key, V value) {
        checkNotNull(key, "Key cannot be null.");
        checkNotNull(value, "Value cannot be null.");
        byte[] prevVal = items.put(serializer.encode(key), serializer.encode(value));
        if (prevVal == null) {
            return null;
        }
        return serializer.decode(prevVal);
    }

    public  PersistentMap(Serializer serializer, DB database, String name);

}