Class SettingsMapImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.SettingsMapImpl
-
- All Implemented Interfaces:
EventListener
,ChangeListener
,SettingsMap
public class SettingsMapImpl extends Object implements SettingsMap, ChangeListener
- Since:
- 7.0
- Author:
- Maxim Podkolzine (maxim.podkolzine@jetbrains.com)
-
-
Constructor Summary
Constructors Constructor Description SettingsMapImpl(File storageFile, FileWatcherFactory fileWatcherFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
changeOccured(String requestor)
Method is called when a change was occurred.String
getValue(String key)
Returns the value for thekey
, ornull
if there is no one.String
remove(String key)
Removes and persists the entry associated with thekey
.void
setValue(String key, String value)
Sets and persists thekey
/value
entry.
-
-
-
Constructor Detail
-
SettingsMapImpl
public SettingsMapImpl(@NotNull File storageFile, @NotNull FileWatcherFactory fileWatcherFactory)
-
-
Method Detail
-
getValue
public String getValue(@NotNull String key)
Description copied from interface:SettingsMap
Returns the value for thekey
, ornull
if there is no one. The call may require the I/O operations, so can be potentially slow.- Specified by:
getValue
in interfaceSettingsMap
- Parameters:
key
- the key- Returns:
- the value, or null
-
setValue
public void setValue(@NotNull String key, @NotNull String value)
Description copied from interface:SettingsMap
Sets and persists thekey
/value
entry. The call requires the I/O operations, hence can be slow.- Specified by:
setValue
in interfaceSettingsMap
- Parameters:
key
- the keyvalue
- the value
-
remove
public String remove(@NotNull String key)
Description copied from interface:SettingsMap
Removes and persists the entry associated with thekey
. The call requires the I/O operations, hence can be slow.- Specified by:
remove
in interfaceSettingsMap
- Parameters:
key
- the key- Returns:
- the previous value associated with the key, or null
-
changeOccured
public void changeOccured(String requestor)
Description copied from interface:ChangeListener
Method is called when a change was occurred.- Specified by:
changeOccured
in interfaceChangeListener
- Parameters:
requestor
- source of the change, same asChangeProvider.getRequestor()
-
-