@Override public boolean storeNoLock(long indexId, byte[] key, byte[] value) throws IOException { Index ix = openIndex(indexId); if (ix != null) { ix.store(Transaction.BOGUS, key, value); } return true; }
@Override public boolean storeNoLock(long indexId, byte[] key, byte[] value) throws IOException { Index ix = openIndex(indexId); if (ix != null) { ix.store(Transaction.BOGUS, key, value); } return true; }
@Override public boolean storeNoLock(long indexId, byte[] key, byte[] value) throws IOException { Index ix = openIndex(indexId); if (ix != null) { ix.store(Transaction.BOGUS, key, value); } return true; }
@Override public boolean storeNoLock(long indexId, byte[] key, byte[] value) throws IOException { Index ix = openIndex(indexId); if (ix != null) { ix.store(Transaction.BOGUS, key, value); } return true; }
@Override public boolean storeNoLock(long indexId, byte[] key, byte[] value) throws IOException { Index ix = openIndex(indexId); if (ix != null) { ix.store(Transaction.BOGUS, key, value); } return true; }
@Override public boolean storeNoLock(long indexId, byte[] key, byte[] value) throws IOException { Index ix = openIndex(indexId); if (ix != null) { ix.store(Transaction.BOGUS, key, value); } return true; }
public void run() { Index ix; try { if (lock != null) { txn.push(lock, 0); } ix = getIndex(indexId); while (true) { try { ix.store(txn, key, value); break; } catch (ClosedIndexException e) { // User closed the shared index reference, so re-open it. ix = openIndex(indexId, null); } } txn.commitAll(); } catch (Throwable e) { fail(e); return; } notifyStore(ix, key, value); } };
public void run() { Index ix; try { if (lock != null) { txn.push(lock, 0); } ix = getIndex(indexId); while (true) { try { ix.store(txn, key, value); break; } catch (ClosedIndexException e) { // User closed the shared index reference, so re-open it. ix = openIndex(indexId, null); } } txn.commit(); } catch (Throwable e) { fail(e); return; } notifyStore(ix, key, value); } });
public void run() { Index ix; try { if (lock != null) { txn.push(lock, 0); } ix = getIndex(indexId); while (true) { try { ix.store(txn, key, value); break; } catch (ClosedIndexException e) { // User closed the shared index reference, so re-open it. ix = openIndex(indexId, null); } } } catch (Throwable e) { fail(e); return; } notifyStore(ix, key, value); } });
public default void store(final String indexName, final byte[] key, final byte[] value) { checkNotNull(indexName, "Precondition violation - argument 'indexName' must not be NULL!"); checkNotNull(key, "Precondition violation - argument 'key' must not be NULL!"); checkNotNull(value, "Precondition violation - argument 'value' must not be NULL!"); Index index = this.getIndex(indexName); try { index.store(this.getRawTx(), key, value); } catch (IOException e) { throw new ChronosIOException("Failed to store data in index! See root cause for details.", e); } }
@Override public boolean txnStore(long txnId, long indexId, byte[] key, byte[] value) throws IOException { Transaction txn = txn(txnId); if (txn != null) { Index ix = openIndex(indexId); if (ix != null) { ix.store(txn, key, value); } } return true; }
@Override public boolean txnStore(long txnId, long indexId, byte[] key, byte[] value) throws IOException { Transaction txn = txn(txnId); if (txn != null) { Index ix = openIndex(indexId); if (ix != null) { ix.store(txn, key, value); } } return true; }
@Override public boolean txnStore(long txnId, long indexId, byte[] key, byte[] value) throws IOException { Transaction txn = txn(txnId); if (txn != null) { Index ix = openIndex(indexId); if (ix != null) { ix.store(txn, key, value); } } return true; }
@Override public boolean txnStore(long txnId, long indexId, byte[] key, byte[] value) throws IOException { Transaction txn = txn(txnId); if (txn != null) { Index ix = openIndex(indexId); if (ix != null) { ix.store(txn, key, value); } } return true; }
@Override public boolean txnStore(long txnId, long indexId, byte[] key, byte[] value) throws IOException { Transaction txn = txn(txnId); if (txn != null) { Index ix = openIndex(indexId); if (ix != null) { ix.store(txn, key, value); } } return true; }
/** * Unconditionally associates an object with a specified key. * * @param indexName Index name * @param id ID of the object to be updated * @param objectContents Object contents, to be associated with a given ID */ default void storeObject(@Nonnull String indexName, @Nonnull Key id, @Nonnull byte[] objectContents) { withTransaction(tx -> withIndex(indexName, index -> { index.store(tx, id.getBytesNoCopy(), objectContents); return null; })); }
@Override public boolean txnStore(long txnId, long indexId, byte[] key, byte[] value) throws IOException { Transaction txn = txn(txnId); if (txn != null) { Index ix = openIndex(indexId); if (ix != null) { ix.store(txn, key, value); } } return true; }
private void doStore(Transaction txn, long indexId, byte[] key, byte[] value) throws IOException { Index ix = getIndex(indexId); while (ix != null) { try { ix.store(txn, key, value); return; } catch (Throwable e) { ix = reopenIndex(e, indexId); } } }
private void doStore(Transaction txn, long indexId, byte[] key, byte[] value) throws IOException { Index ix = getIndex(indexId); while (ix != null) { try { ix.store(txn, key, value); return; } catch (Throwable e) { ix = reopenIndex(e, indexId); } } }
public void insert(StaticBuffer key, StaticBuffer value, StoreTransaction txh) throws BackendException { final TuplStoreTransaction tx = TuplStoreTransaction.getTx(txh); try { dbindex.store(tx.getTuplTxn(), getByteArray(key), getByteArray(value)); } catch (IOException e) { throw new PermanentBackendException("unable to close store named "+ name, e); } }