Package com.boomi.connector.api
Interface PersistedConnectorCache
-
public interface PersistedConnectorCache
Interface to set and retrieve the listeners persisted cache's properties
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getPersistedProperty(String key)
Gets an up-to-date persisted property.String
getPersistedProperty(String key, String defaultValue)
Gets an up-to-date persisted property.String
removePersistedProperty(String key)
This allows the users to remove an individual key value property pair from the persisted properties file.void
setPersistedProperty(String key, String value)
Writes a persisted property as a key value pair into the process id based persisted properties file that is created and stored in the container's account specific execution directory.
-
-
-
Method Detail
-
getPersistedProperty
String getPersistedProperty(String key)
Gets an up-to-date persisted property. This will retrieve value for the property key provided. This can either do a read from the in memory cache if available, or the persisted properties file.- Parameters:
key
- String. The property to be retrieved- Returns:
- persisted property value or
null
if not found.
-
getPersistedProperty
String getPersistedProperty(String key, String defaultValue)
Gets an up-to-date persisted property. This will retrieve value for the property key provided, returning the defaultValue if the located property value is blank (null
or all characters are whitespace)- Parameters:
key
- String. The property to be retrieved- Returns:
- persisted property value or
null
if not found.
-
setPersistedProperty
void setPersistedProperty(String key, String value)
Writes a persisted property as a key value pair into the process id based persisted properties file that is created and stored in the container's account specific execution directory. The key value being provided has a size restriction of 100 bytes per key. The property file size should not exceed 1KB prior to adding the new property- Parameters:
key
- String. The key to be set. The key has to an alphanumeric value and is case-sensitivevalue
- String. The corresponding value for the property
-
removePersistedProperty
String removePersistedProperty(String key)
This allows the users to remove an individual key value property pair from the persisted properties file. This will not affect any other keys in the file. Removing a non-existent key will not do anything.- Parameters:
key
- String. The property to be removed- Returns:
- String. The key that was removed.
-
-