@Override public CompletableFuture<V> getAsync(K key) { CompletableFuture<V> future = new CompletableFuture(); try { future.complete(get(key)); } catch (Exception e) { future.completeExceptionally(e); } return future; }
@Override public CompletableFuture<Map<K, V>> getAllAsync(List<K> keys) { CompletableFuture<Map<K, V>> future = new CompletableFuture(); try { future.complete(getAll(keys)); } catch (Exception e) { future.completeExceptionally(e); } return future; }
/** * {@inheritDoc} */ @Override public void init(Context context) { super.init(context); writeMetrics = new DefaultTableWriteMetrics(context, this, tableId); }
/** * {@inheritDoc} */ @Override public void init(Context context) { super.init(context); writeMetrics = new DefaultTableWriteMetrics(context, this, tableId); }
@Override public CompletableFuture<Map<K, V>> getAllAsync(List<K> keys) { CompletableFuture<Map<K, V>> future = new CompletableFuture(); try { future.complete(getAll(keys)); } catch (Exception e) { future.completeExceptionally(e); } return future; }
@Override public CompletableFuture<V> getAsync(K key) { CompletableFuture<V> future = new CompletableFuture(); try { future.complete(get(key)); } catch (Exception e) { future.completeExceptionally(e); } return future; }