@Override public void compact(String table, String key, @Nullable Duration ttlOverride, ReadConsistency readConsistency, WriteConsistency writeConsistency) { _delegate.compact(table, key, ttlOverride, readConsistency, writeConsistency); }
@Override public void compact(String table, String key, @Nullable Duration ttlOverride, ReadConsistency readConsistency, WriteConsistency writeConsistency) { _delegate.compact(table, key, ttlOverride, readConsistency, writeConsistency); }
@Override public void compact(String table, String key, @Nullable Duration ttlOverride, ReadConsistency readConsistency, WriteConsistency writeConsistency) { _local.get().compact(table, key, ttlOverride, readConsistency, writeConsistency); }
@Override public void compact(String table, String key, @Nullable Duration ttlOverride, ReadConsistency readConsistency, WriteConsistency writeConsistency) { _local.get().compact(table, key, ttlOverride, readConsistency, writeConsistency); }
/** * Attempts to reduce the size of the specified content in the underlying storage. * Normally compaction occurs automatically as a side effect of performing a * {@link #get}, but it can be forced to occur using this method. */ @POST @Path ("{table}/{key}/compact") @RequiresPermissions ("sor|compact|{table}") @Timed (name = "bv.emodb.sor.DataStoreResource1.compact", absolute = true) @ApiOperation (value = "Attempts to reduce the size of the specified content in the underlying storage.", notes = "Attempts to reduce the size of the specified content in the underlying storage.\n" + " Normally compaction occurs automatically as a side effect of performing a\n" + " {@link #get}, but it can be forced to occur using this method.", response = SuccessResponse.class ) public SuccessResponse compact(@PathParam ("table") String table, @PathParam ("key") String key, @QueryParam ("ttl") SecondsParam ttlParam, @QueryParam ("readConsistency") @DefaultValue ("STRONG") ReadConsistencyParam readConsistency, @QueryParam ("writeConsistency") @DefaultValue ("STRONG") WriteConsistencyParam writeConsistency) { // Weak consistency should work, but presumably the caller is debugging/testing so the // performance hit of strong consistency is worth it so default to strong consistency Duration ttl = getOptional(ttlParam); _dataStore.compact(table, key, ttl, readConsistency.get(), writeConsistency.get()); return SuccessResponse.instance(); }