com.netflix.eureka2.interests.ModifyNotification Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eureka-core Show documentation
Show all versions of eureka-core Show documentation
eureka-core developed by Netflix
The newest version!
package com.netflix.eureka2.interests;
import com.netflix.eureka2.registry.Delta;
import java.util.Set;
/**
* A specific {@link ChangeNotification} class for modifications. This adds a metadata about the change that was applied
* to the existing value which returned in the value associated with the notification.
*
* This metadata is useful to optimize sending of the entire new data (typically over the wire) when only a few fields
* have actually changed.
*
* @author Nitesh Kant
*/
public class ModifyNotification extends ChangeNotification {
private final Set> delta;
/**
* Creates a new notification.
*
* @param data Data which resulted after applying the passed delta to the existing data.
* @param delta Delta which resulted in the passed {@code data}. The collection should typically be immutable.
*/
public ModifyNotification(T data, Set> delta) {
super(Kind.Modify, data);
this.delta = delta;
}
public Set> getDelta() {
return delta;
}
@Override
public String toString() {
return "ModifyNotification{" +
"delta=" + delta +
"} " + super.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy