Class RedisPersistence
- java.lang.Object
-
- org.epics.archiverappliance.config.persistence.RedisPersistence
-
- All Implemented Interfaces:
ConfigPersistence
public class RedisPersistence extends Object implements ConfigPersistence
Uses redis as a persistence layer. To set the path to the redis instance, use the environment variable ARCHAPPL_PERSISTENCE_LAYER_REDISURL. This defaults tolocalhost
To use this persistence layer, useexport ARCHAPPL_PERSISTENCE_LAYER="org.epics.archiverappliance.config.persistence.RedisPersistence" export ARCHAPPL_PERSISTENCE_LAYER_REDISURL="localhost"
- Author:
- mshankar
-
-
Field Summary
Fields Modifier and Type Field Description static String
ARCHAPPL_PERSISTENCE_LAYER_REDISURL
-
Constructor Summary
Constructors Constructor Description RedisPersistence()
-
Method Summary
Modifier and Type Method Description void
deleteTypeInfo(String pvName)
String
getAliasNamesToRealName(String pvName)
List<String>
getAliasNamesToRealNamesKeys()
List<PVTypeInfo>
getAllTypeInfosForAppliance(String applianceIdentity)
UserSpecifiedSamplingParams
getArchivePVRequest(String pvName)
List<String>
getArchivePVRequestsKeys()
String
getExternalDataServer(String serverId)
List<String>
getExternalDataServersKeys()
PVTypeInfo
getTypeInfo(String pvName)
List<String>
getTypeInfoKeys()
void
putAliasNamesToRealName(String pvName, String realName)
void
putArchivePVRequest(String pvName, UserSpecifiedSamplingParams userParams)
void
putExternalDataServer(String serverId, String serverInfo)
void
putTypeInfo(String pvName, PVTypeInfo typeInfo)
void
removeAliasName(String pvName, String realName)
void
removeArchivePVRequest(String pvName)
void
removeExternalDataServer(String serverId, String serverInfo)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.epics.archiverappliance.config.ConfigPersistence
initialize
-
-
-
-
Field Detail
-
ARCHAPPL_PERSISTENCE_LAYER_REDISURL
public static final String ARCHAPPL_PERSISTENCE_LAYER_REDISURL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RedisPersistence
public RedisPersistence() throws ConfigException
- Throws:
ConfigException
-
-
Method Detail
-
getTypeInfoKeys
public List<String> getTypeInfoKeys() throws IOException
- Specified by:
getTypeInfoKeys
in interfaceConfigPersistence
- Throws:
IOException
-
getAllTypeInfosForAppliance
public List<PVTypeInfo> getAllTypeInfosForAppliance(String applianceIdentity) throws IOException
- Specified by:
getAllTypeInfosForAppliance
in interfaceConfigPersistence
- Throws:
IOException
-
getTypeInfo
public PVTypeInfo getTypeInfo(String pvName) throws IOException
- Specified by:
getTypeInfo
in interfaceConfigPersistence
- Throws:
IOException
-
putTypeInfo
public void putTypeInfo(String pvName, PVTypeInfo typeInfo) throws IOException
- Specified by:
putTypeInfo
in interfaceConfigPersistence
- Throws:
IOException
-
deleteTypeInfo
public void deleteTypeInfo(String pvName) throws IOException
- Specified by:
deleteTypeInfo
in interfaceConfigPersistence
- Throws:
IOException
-
getArchivePVRequestsKeys
public List<String> getArchivePVRequestsKeys() throws IOException
- Specified by:
getArchivePVRequestsKeys
in interfaceConfigPersistence
- Throws:
IOException
-
getArchivePVRequest
public UserSpecifiedSamplingParams getArchivePVRequest(String pvName) throws IOException
- Specified by:
getArchivePVRequest
in interfaceConfigPersistence
- Throws:
IOException
-
putArchivePVRequest
public void putArchivePVRequest(String pvName, UserSpecifiedSamplingParams userParams) throws IOException
- Specified by:
putArchivePVRequest
in interfaceConfigPersistence
- Throws:
IOException
-
removeArchivePVRequest
public void removeArchivePVRequest(String pvName) throws IOException
- Specified by:
removeArchivePVRequest
in interfaceConfigPersistence
- Throws:
IOException
-
getExternalDataServersKeys
public List<String> getExternalDataServersKeys() throws IOException
- Specified by:
getExternalDataServersKeys
in interfaceConfigPersistence
- Throws:
IOException
-
getExternalDataServer
public String getExternalDataServer(String serverId) throws IOException
- Specified by:
getExternalDataServer
in interfaceConfigPersistence
- Throws:
IOException
-
putExternalDataServer
public void putExternalDataServer(String serverId, String serverInfo) throws IOException
- Specified by:
putExternalDataServer
in interfaceConfigPersistence
- Throws:
IOException
-
removeExternalDataServer
public void removeExternalDataServer(String serverId, String serverInfo) throws IOException
- Specified by:
removeExternalDataServer
in interfaceConfigPersistence
- Throws:
IOException
-
getAliasNamesToRealNamesKeys
public List<String> getAliasNamesToRealNamesKeys() throws IOException
- Specified by:
getAliasNamesToRealNamesKeys
in interfaceConfigPersistence
- Throws:
IOException
-
getAliasNamesToRealName
public String getAliasNamesToRealName(String pvName) throws IOException
- Specified by:
getAliasNamesToRealName
in interfaceConfigPersistence
- Throws:
IOException
-
putAliasNamesToRealName
public void putAliasNamesToRealName(String pvName, String realName) throws IOException
- Specified by:
putAliasNamesToRealName
in interfaceConfigPersistence
- Throws:
IOException
-
removeAliasName
public void removeAliasName(String pvName, String realName) throws IOException
- Specified by:
removeAliasName
in interfaceConfigPersistence
- Throws:
IOException
-
-