Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package com.bazaarvoice.emodb.sor.api;
import com.bazaarvoice.emodb.auth.proxy.Credential;
import com.bazaarvoice.emodb.sor.delta.Delta;
import javax.annotation.Nullable;
import java.net.URI;
import java.time.Duration;
import java.util.Collection;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
/**
* Authenticating interface to {@link DataStore}. This method should exactly mirror DataStore except with added credentials
* in each call.
*
* @see DataStore
*/
public interface AuthDataStore {
/**
* Retrieves metadata about up to {@code limit} tables. The records will be returned in a deterministic
* order but not sorted alphabetically by key. If {@code fromTableExclusive} is not null, the list will
* start with the first table that follows the specified key in the returned sort order.
*
* Note: clients are strongly encouraged to use the version of this method wrapped by the
* {@code com.bazaarvoice.emodb.sor.client.DataStoreStreaming} class which will restart the iterator in the
* event that the connection to the EmoDB server is lost while streaming results.
*/
Iterator
listTables(@Credential String apiKey, @Nullable String fromTableExclusive, long limit);
/**
* Retrieves the list of table events that are not published on the databus.
*/
Iterator listUnpublishedDatabusEvents(@Credential String apiKey, Date fromInclusive, Date toExclusive);
/**
* Creates a logical table in the data store.
*
* @throws TableExistsException if the table exists already with different options or a different template.
*/
void createTable(@Credential String apiKey, String table, TableOptions options, Map template, Audit audit)
throws TableExistsException;
/**
* Drops the specified table and all data associated with it.
*/
void dropTable(@Credential String apiKey, String table, Audit audit)
throws UnknownTableException;
/**
* Makes a best effort to permanently delete all data from the specified table. This method is not safe for use
* with the databus--it does not generate databus events and resets the version number of all content to zero.
* Useful for debugging/testing, but not intended for use in production.
*/
void purgeTableUnsafe(@Credential String apiKey, String table, Audit audit)
throws UnknownTableException;
/**
* Returns true if the specified table exists.
*/
boolean getTableExists(@Credential String apiKey, String table);
/**
* Returns true if the specified table is available to the current data center.
*/
boolean isTableAvailable(@Credential String apiKey, String table);
/**
* Returns the table metadata.
*/
Table getTableMetadata(@Credential String apiKey, String table);
/**
* Returns the template associated with a table.
*/
Map getTableTemplate(@Credential String apiKey, String table)
throws UnknownTableException;
/**
* Replaces the template for an existing table.
*/
void setTableTemplate(@Credential String apiKey, String table, Map template, Audit audit)
throws UnknownTableException;
/**
* Returns the storage options associated with a table.
*/
TableOptions getTableOptions(@Credential String apiKey, String table)
throws UnknownTableException;
/**
* Returns an estimate of the number of distinct records ever written to the specified table. This will include
* records that have been deleted by writing a Delete delta.
*
* Useful for debugging/testing, but not intended for use in production because it performs an unbounded amount of work.
* Please do not use this method to monitor your data in production!
*/
long getTableApproximateSize(@Credential String apiKey, String table)
throws UnknownTableException;
long getTableApproximateSize(@Credential String apiKey, String table, int limit)
throws UnknownTableException;
/**
* Retrieves the current version of a piece of content from the data store.
* Uses {@link ReadConsistency#STRONG}.
*/
Map get(@Credential String apiKey, String table, String key);
/**
* Retrieves the current version of a piece of content from the data store.
*/
Map get(@Credential String apiKey, String table, String key, ReadConsistency consistency);
/**
* Retrieves all recorded history for a piece of content in the data store.
*/
Iterator getTimeline(@Credential String apiKey, String table, String key, boolean includeContentData,
boolean includeAuditInformation, @Nullable UUID start, @Nullable UUID end,
boolean reversed, long limit, ReadConsistency consistency);
/**
* Retrieves up to {@code limit} records from the specified table. The records will be returned in a deterministic
* order but not sorted alphabetically by key. If {@code fromKeyExclusive} is not null, the scan will start with
* the first record that follows the specified key in the returned sort order.
*
* Note: clients are strongly encouraged to use the version of this method wrapped by the
* {@code com.bazaarvoice.emodb.sor.client.DataStoreStreaming} class which will restart the iterator in the
* event that the connection to the EmoDB server is lost while streaming results.
*/
Iterator