public class StoreProperties extends Object implements Cloneable
StoreProperties
contains specific configuration information for the store, such as database
connection strings. It wraps Properties
and lazy loads the all properties from a file when first used.
All StoreProperties classes must be JSON serialisable.
Modifier and Type | Field and Description |
---|---|
static String |
ADMIN_AUTH |
static String |
EXECUTOR_SERVICE_THREAD_COUNT |
static String |
EXECUTOR_SERVICE_THREAD_COUNT_DEFAULT |
static String |
ID
Deprecated.
the ID should not be used. The properties ID should be supplied to the graph library separately.
|
static String |
JOB_TRACKER_ENABLED |
static String |
JSON_SERIALISER_CLASS |
static String |
JSON_SERIALISER_MODULES |
static String |
OPERATION_DECLARATIONS |
static String |
REFLECTION_PACKAGES
CSV of extra packages to be included in the reflection scanning.
|
static String |
SCHEMA_CLASS |
static String |
STORE_CLASS |
static String |
STORE_PROPERTIES_CLASS |
static String |
STRICT_JSON |
Constructor and Description |
---|
StoreProperties() |
StoreProperties(Path propFileLocation) |
StoreProperties(Properties props) |
StoreProperties(String id)
Deprecated.
the id should not be used. The properties id should be supplied to the graph library separately.
|
public static final String STORE_CLASS
public static final String SCHEMA_CLASS
@Deprecated public static final String ID
public static final String STORE_PROPERTIES_CLASS
public static final String OPERATION_DECLARATIONS
public static final String JOB_TRACKER_ENABLED
public static final String EXECUTOR_SERVICE_THREAD_COUNT
public static final String EXECUTOR_SERVICE_THREAD_COUNT_DEFAULT
public static final String JSON_SERIALISER_CLASS
public static final String JSON_SERIALISER_MODULES
public static final String STRICT_JSON
public static final String ADMIN_AUTH
public static final String REFLECTION_PACKAGES
public StoreProperties()
@Deprecated public StoreProperties(String id)
id
- the StoreProperties id.public StoreProperties(Path propFileLocation)
public StoreProperties(Properties props)
public static <T extends StoreProperties> T loadStoreProperties(String pathStr, Class<T> requiredClass)
public static StoreProperties loadStoreProperties(String pathStr)
public static <T extends StoreProperties> T loadStoreProperties(Path storePropertiesPath, Class<T> requiredClass)
public static StoreProperties loadStoreProperties(Path storePropertiesPath)
public static <T extends StoreProperties> T loadStoreProperties(InputStream storePropertiesStream, Class<T> requiredClass)
public static StoreProperties loadStoreProperties(InputStream storePropertiesStream)
public static <T extends StoreProperties> T loadStoreProperties(Properties props, Class<T> requiredClass)
public static StoreProperties loadStoreProperties(Properties props)
public String get(String key)
key
- the property keypublic boolean containsKey(Object key)
public String get(String key, String defaultValue)
key
- the property keydefaultValue
- the default value to use if the property doesn't
existpublic void set(String key, String value)
key
- the keyvalue
- the valuepublic void merge(StoreProperties properties)
@Deprecated public String getId()
@Deprecated public void setId(String id)
id
- the value of the IDpublic OperationDeclarations getOperationDeclarations()
public String getStoreClass()
public void setStoreClass(String storeClass)
public Boolean getJobTrackerEnabled()
public void setJobTrackerEnabled(Boolean jobTrackerEnabled)
public String getSchemaClassName()
public void setSchemaClass(String schemaClass)
public String getStorePropertiesClassName()
public void setStorePropertiesClassName(String storePropertiesClassName)
public Class<? extends StoreProperties> getStorePropertiesClass()
public void setStorePropertiesClass(Class<? extends StoreProperties> storePropertiesClass)
public String getOperationDeclarationPaths()
public void setOperationDeclarationPaths(String paths)
public String getReflectionPackages()
public void setReflectionPackages(String packages)
public Integer getJobExecutorThreadCount()
public void addOperationDeclarationPaths(String... newPaths)
public String getJsonSerialiserClass()
public void setJsonSerialiserClass(Class<? extends JSONSerialiser> jsonSerialiserClass)
public void setJsonSerialiserClass(String jsonSerialiserClass)
public String getJsonSerialiserModules()
public void setJsonSerialiserModules(Set<Class<? extends JSONSerialiserModules>> modules)
public void setJsonSerialiserModules(String modules)
public Boolean getStrictJson()
public void setStrictJson(Boolean strictJson)
public String getAdminAuth()
public void setAdminAuth(String adminAuth)
public Properties getProperties()
public void setProperties(Properties properties)
public StoreProperties clone()
public void updateStorePropertiesClass()
public void updateStorePropertiesClass(Class<? extends StoreProperties> requiredClass)
Copyright © 2022. All rights reserved.