Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
gh-204 Introduce putMetadata() and setMetadata() to ServiceInstance
Introduce putMetadata(String key, String value) and
 setMetadata(Map<String, String> metadata) to ServiceInstance, to be
 able to adjust the metadata field through the ServiceInstance api.
  • Loading branch information
smcvb committed May 16, 2017
commit 15cd2bc37bcb0b0de140a634a194b676c93a8421
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@

/**
* Represents an instance of a Service in a Discovery System
*
* @author Spencer Gibb
* @author Steven van Beelen
*/
public interface ServiceInstance {

Expand Down Expand Up @@ -54,4 +56,20 @@ public interface ServiceInstance {
* @return the key value pair metadata associated with the service instance
*/
Map<String, String> getMetadata();

/**
* Add a key/value pair to the metadata map.
*
* @param key a metadata key as a String
* @param value a corresponding metadata value as a String
*/
void putMetadata(String key, String value);

/**
* Replace the current metadata map for a new one.
*
* @param metadata a metadata map to replace the current metadata
*/
void setMetadata(Map<String, String> metadata);

}