Hi,

I was inspecting RocksDBStore and I saw get and put methods being
synchronized.

Are there any issues in RocksDB due to which we have used it. Could someone
please enlighten more on this.

 @Override
    public synchronized V get(K key) {
        validateStoreOpen();
        byte[] byteValue = getInternal(serdes.rawKey(key));
        if (byteValue == null) {
            return null;
        } else {
            return serdes.valueFrom(byteValue);
        }
    }

    @SuppressWarnings("unchecked")
    @Override
    public synchronized void put(K key, V value) {
        validateStoreOpen();
        byte[] rawKey = serdes.rawKey(key);
        byte[] rawValue = serdes.rawValue(value);
        putInternal(rawKey, rawValue);
    }

-Sameer.

Reply via email to