com.bytex.snamp.connector.dataStream.DistributedAttribute Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of data-stream Show documentation
Show all versions of data-stream Show documentation
Framework for writing connectors based on message processing
The newest version!
package com.bytex.snamp.connector.dataStream;
import com.bytex.snamp.connector.attributes.AttributeDescriptor;
import com.bytex.snamp.connector.attributes.AttributeSpecifier;
import org.osgi.framework.InvalidSyntaxException;
import javax.management.Notification;
import javax.management.openmbean.OpenType;
import java.io.Serializable;
/**
* Represents attribute which state can be synchronized across cluster.
* @param Type of attribute value
* @param Type of notifications that can be handled by attribute.
* @author Roman Sakno
* @version 2.0
* @since 2.0
*/
public abstract class DistributedAttribute extends TypedSyntheticAttribute {
private static final long serialVersionUID = 1695985515176219703L;
protected DistributedAttribute(final Class notificationType,
final String name,
final OpenType type,
final String description,
final AttributeDescriptor descriptor) throws InvalidSyntaxException {
super(notificationType, name, type, description, AttributeSpecifier.READ_ONLY, descriptor);
}
protected abstract T getValue();
protected abstract Serializable takeSnapshot();
protected abstract void loadFromSnapshot(final Serializable snapshot);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy