com.distelli.persistence.PersistenceConfig Maven / Gradle / Ivy
package com.distelli.persistence;
import com.distelli.cred.CredProvider;
import com.distelli.crypto.KeyProvider;
import java.io.File;
import java.net.URI;
public interface PersistenceConfig {
public interface Factory {
/**
* @param file is the file to read for the PersistenceConfig.
*
* @return the config read from the file.
*/
public PersistenceConfig create(File file);
/**
* @param file is the file to read for the PersistenceConfig.
*
* @param defaultConfig is used if any field is null.
*
* @return the config read from the file.
*/
public PersistenceConfig create(File file, PersistenceConfig defaultConfig);
}
/**
* @return the scale factor capacity to use when creating new tables.
*/
public Double getCapacityScaleFactor();
/**
* @return the tableNameFormat or null.
*/
public String getTableNameFormat();
/**
* @return the endpoint specified or null.
*/
public URI getEndpoint();
/**
* @return the proxy URI if specified or null.
*/
public URI getProxy();
/**
* @return the CredProvider for this PersistenceConfig.
*/
public CredProvider getCredProvider();
/**
* @return null if the config did not originate from a file, otherwise
* return the file in which the config originates from.
*/
public File getFile();
/**
* @return the default KeyProvider.
*/
public KeyProvider getKeyProvider();
}