Package org.jlab.jaws.entity
Class AlarmRegistration
- java.lang.Object
-
- org.apache.avro.specific.SpecificRecordBase
-
- org.jlab.jaws.entity.AlarmRegistration
-
- All Implemented Interfaces:
Externalizable
,Serializable
,Comparable<org.apache.avro.specific.SpecificRecord>
,org.apache.avro.generic.GenericContainer
,org.apache.avro.generic.GenericRecord
,org.apache.avro.generic.IndexedRecord
,org.apache.avro.specific.SpecificRecord
public class AlarmRegistration extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord
Master alarm database record- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AlarmRegistration.Builder
RecordBuilder for AlarmRegistration instances.
-
Field Summary
Fields Modifier and Type Field Description static org.apache.avro.Schema
SCHEMA$
-
Constructor Summary
Constructors Constructor Description AlarmRegistration()
Default constructor.AlarmRegistration(String class$, Object producer, AlarmLocation location, AlarmCategory category, AlarmPriority priority, String rationale, String correctiveaction, String pointofcontactusername, Boolean latching, Boolean filterable, Long ondelayseconds, Long offdelayseconds, String maskedby, String screenpath)
All-args constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.apache.avro.message.BinaryMessageDecoder<AlarmRegistration>
createDecoder(org.apache.avro.message.SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specifiedSchemaStore
.static AlarmRegistration
fromByteBuffer(ByteBuffer b)
Deserializes a AlarmRegistration from a ByteBuffer.Object
get(int field$)
AlarmCategory
getCategory()
Gets the value of the 'category' field.String
getClass$()
Gets the value of the 'class$' field.static org.apache.avro.Schema
getClassSchema()
String
getCorrectiveaction()
Gets the value of the 'correctiveaction' field.static org.apache.avro.message.BinaryMessageDecoder<AlarmRegistration>
getDecoder()
Return the BinaryMessageDecoder instance used by this class.static org.apache.avro.message.BinaryMessageEncoder<AlarmRegistration>
getEncoder()
Return the BinaryMessageEncoder instance used by this class.Boolean
getFilterable()
Gets the value of the 'filterable' field.Boolean
getLatching()
Gets the value of the 'latching' field.AlarmLocation
getLocation()
Gets the value of the 'location' field.String
getMaskedby()
Gets the value of the 'maskedby' field.Long
getOffdelayseconds()
Gets the value of the 'offdelayseconds' field.Long
getOndelayseconds()
Gets the value of the 'ondelayseconds' field.String
getPointofcontactusername()
Gets the value of the 'pointofcontactusername' field.AlarmPriority
getPriority()
Gets the value of the 'priority' field.Object
getProducer()
Gets the value of the 'producer' field.String
getRationale()
Gets the value of the 'rationale' field.org.apache.avro.Schema
getSchema()
String
getScreenpath()
Gets the value of the 'screenpath' field.org.apache.avro.specific.SpecificData
getSpecificData()
static AlarmRegistration.Builder
newBuilder()
Creates a new AlarmRegistration RecordBuilder.static AlarmRegistration.Builder
newBuilder(AlarmRegistration other)
Creates a new AlarmRegistration RecordBuilder by copying an existing AlarmRegistration instance.static AlarmRegistration.Builder
newBuilder(AlarmRegistration.Builder other)
Creates a new AlarmRegistration RecordBuilder by copying an existing Builder.void
put(int field$, Object value$)
void
readExternal(ObjectInput in)
void
setCategory(AlarmCategory value)
Sets the value of the 'category' field.void
setClass$(String value)
Sets the value of the 'class$' field.void
setCorrectiveaction(String value)
Sets the value of the 'correctiveaction' field.void
setFilterable(Boolean value)
Sets the value of the 'filterable' field.void
setLatching(Boolean value)
Sets the value of the 'latching' field.void
setLocation(AlarmLocation value)
Sets the value of the 'location' field.void
setMaskedby(String value)
Sets the value of the 'maskedby' field.void
setOffdelayseconds(Long value)
Sets the value of the 'offdelayseconds' field.void
setOndelayseconds(Long value)
Sets the value of the 'ondelayseconds' field.void
setPointofcontactusername(String value)
Sets the value of the 'pointofcontactusername' field.void
setPriority(AlarmPriority value)
Sets the value of the 'priority' field.void
setProducer(Object value)
Sets the value of the 'producer' field.void
setRationale(String value)
Sets the value of the 'rationale' field.void
setScreenpath(String value)
Sets the value of the 'screenpath' field.ByteBuffer
toByteBuffer()
Serializes this AlarmRegistration to a ByteBuffer.void
writeExternal(ObjectOutput out)
-
Methods inherited from class org.apache.avro.specific.SpecificRecordBase
compareTo, customDecode, customEncode, equals, get, getConversion, getConversion, hasCustomCoders, hashCode, put, toString
-
-
-
-
Constructor Detail
-
AlarmRegistration
public AlarmRegistration()
Default constructor. Note that this does not initialize fields to their default values from the schema. If that is desired then one should usenewBuilder()
.
-
AlarmRegistration
public AlarmRegistration(String class$, Object producer, AlarmLocation location, AlarmCategory category, AlarmPriority priority, String rationale, String correctiveaction, String pointofcontactusername, Boolean latching, Boolean filterable, Long ondelayseconds, Long offdelayseconds, String maskedby, String screenpath)
All-args constructor.- Parameters:
class$
- The alarm class; provides inheritable shared field values, fields are only overridden if null, the producer field is required and cannot be overriddenproducer
- Indicates how this alarm is produced, useful for producers to monitor when new alarms are added/removedlocation
- The alarm locationcategory
- The alarm categorypriority
- The alarm priorityrationale
- Markdown formatted text describing the reason this alarm is necessarycorrectiveaction
- Markdown formatted text describing the corrective action to take when the alarm becomes activepointofcontactusername
- Username (identifier) of point of contact. Full contact info should be obtained from user database (LDAP for example)latching
- Indicates whether this alarm latches when activated and can only be cleared after an explicit acknowledgementfilterable
- Indicates whether this alarm can be filtered out of view (typically done when a portion of the machine is turned off). Some alarms must always be monitored, regardless of program.ondelayseconds
- The number of seconds of on-delayoffdelayseconds
- The number of seconds of off-delaymaskedby
- The name of the parent alarm, which if active, masks this alarm (flood suppression via logical hierarchy)screenpath
- The path the alarm screen display
-
-
Method Detail
-
getClassSchema
public static org.apache.avro.Schema getClassSchema()
-
getEncoder
public static org.apache.avro.message.BinaryMessageEncoder<AlarmRegistration> getEncoder()
Return the BinaryMessageEncoder instance used by this class.- Returns:
- the message encoder used by this class
-
getDecoder
public static org.apache.avro.message.BinaryMessageDecoder<AlarmRegistration> getDecoder()
Return the BinaryMessageDecoder instance used by this class.- Returns:
- the message decoder used by this class
-
createDecoder
public static org.apache.avro.message.BinaryMessageDecoder<AlarmRegistration> createDecoder(org.apache.avro.message.SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specifiedSchemaStore
.- Parameters:
resolver
- aSchemaStore
used to find schemas by fingerprint- Returns:
- a BinaryMessageDecoder instance for this class backed by the given SchemaStore
-
toByteBuffer
public ByteBuffer toByteBuffer() throws IOException
Serializes this AlarmRegistration to a ByteBuffer.- Returns:
- a buffer holding the serialized data for this instance
- Throws:
IOException
- if this instance could not be serialized
-
fromByteBuffer
public static AlarmRegistration fromByteBuffer(ByteBuffer b) throws IOException
Deserializes a AlarmRegistration from a ByteBuffer.- Parameters:
b
- a byte buffer holding serialized data for an instance of this class- Returns:
- a AlarmRegistration instance decoded from the given buffer
- Throws:
IOException
- if the given bytes could not be deserialized into an instance of this class
-
getSpecificData
public org.apache.avro.specific.SpecificData getSpecificData()
- Overrides:
getSpecificData
in classorg.apache.avro.specific.SpecificRecordBase
-
getSchema
public org.apache.avro.Schema getSchema()
- Specified by:
getSchema
in interfaceorg.apache.avro.generic.GenericContainer
- Specified by:
getSchema
in classorg.apache.avro.specific.SpecificRecordBase
-
get
public Object get(int field$)
- Specified by:
get
in interfaceorg.apache.avro.generic.IndexedRecord
- Specified by:
get
in classorg.apache.avro.specific.SpecificRecordBase
-
put
public void put(int field$, Object value$)
- Specified by:
put
in interfaceorg.apache.avro.generic.IndexedRecord
- Specified by:
put
in classorg.apache.avro.specific.SpecificRecordBase
-
getClass$
public String getClass$()
Gets the value of the 'class$' field.- Returns:
- The alarm class; provides inheritable shared field values, fields are only overridden if null, the producer field is required and cannot be overridden
-
setClass$
public void setClass$(String value)
Sets the value of the 'class$' field. The alarm class; provides inheritable shared field values, fields are only overridden if null, the producer field is required and cannot be overridden- Parameters:
value
- the value to set.
-
getProducer
public Object getProducer()
Gets the value of the 'producer' field.- Returns:
- Indicates how this alarm is produced, useful for producers to monitor when new alarms are added/removed
-
setProducer
public void setProducer(Object value)
Sets the value of the 'producer' field. Indicates how this alarm is produced, useful for producers to monitor when new alarms are added/removed- Parameters:
value
- the value to set.
-
getLocation
public AlarmLocation getLocation()
Gets the value of the 'location' field.- Returns:
- The alarm location
-
setLocation
public void setLocation(AlarmLocation value)
Sets the value of the 'location' field. The alarm location- Parameters:
value
- the value to set.
-
getCategory
public AlarmCategory getCategory()
Gets the value of the 'category' field.- Returns:
- The alarm category
-
setCategory
public void setCategory(AlarmCategory value)
Sets the value of the 'category' field. The alarm category- Parameters:
value
- the value to set.
-
getPriority
public AlarmPriority getPriority()
Gets the value of the 'priority' field.- Returns:
- The alarm priority
-
setPriority
public void setPriority(AlarmPriority value)
Sets the value of the 'priority' field. The alarm priority- Parameters:
value
- the value to set.
-
getRationale
public String getRationale()
Gets the value of the 'rationale' field.- Returns:
- Markdown formatted text describing the reason this alarm is necessary
-
setRationale
public void setRationale(String value)
Sets the value of the 'rationale' field. Markdown formatted text describing the reason this alarm is necessary- Parameters:
value
- the value to set.
-
getCorrectiveaction
public String getCorrectiveaction()
Gets the value of the 'correctiveaction' field.- Returns:
- Markdown formatted text describing the corrective action to take when the alarm becomes active
-
setCorrectiveaction
public void setCorrectiveaction(String value)
Sets the value of the 'correctiveaction' field. Markdown formatted text describing the corrective action to take when the alarm becomes active- Parameters:
value
- the value to set.
-
getPointofcontactusername
public String getPointofcontactusername()
Gets the value of the 'pointofcontactusername' field.- Returns:
- Username (identifier) of point of contact. Full contact info should be obtained from user database (LDAP for example)
-
setPointofcontactusername
public void setPointofcontactusername(String value)
Sets the value of the 'pointofcontactusername' field. Username (identifier) of point of contact. Full contact info should be obtained from user database (LDAP for example)- Parameters:
value
- the value to set.
-
getLatching
public Boolean getLatching()
Gets the value of the 'latching' field.- Returns:
- Indicates whether this alarm latches when activated and can only be cleared after an explicit acknowledgement
-
setLatching
public void setLatching(Boolean value)
Sets the value of the 'latching' field. Indicates whether this alarm latches when activated and can only be cleared after an explicit acknowledgement- Parameters:
value
- the value to set.
-
getFilterable
public Boolean getFilterable()
Gets the value of the 'filterable' field.- Returns:
- Indicates whether this alarm can be filtered out of view (typically done when a portion of the machine is turned off). Some alarms must always be monitored, regardless of program.
-
setFilterable
public void setFilterable(Boolean value)
Sets the value of the 'filterable' field. Indicates whether this alarm can be filtered out of view (typically done when a portion of the machine is turned off). Some alarms must always be monitored, regardless of program.- Parameters:
value
- the value to set.
-
getOndelayseconds
public Long getOndelayseconds()
Gets the value of the 'ondelayseconds' field.- Returns:
- The number of seconds of on-delay
-
setOndelayseconds
public void setOndelayseconds(Long value)
Sets the value of the 'ondelayseconds' field. The number of seconds of on-delay- Parameters:
value
- the value to set.
-
getOffdelayseconds
public Long getOffdelayseconds()
Gets the value of the 'offdelayseconds' field.- Returns:
- The number of seconds of off-delay
-
setOffdelayseconds
public void setOffdelayseconds(Long value)
Sets the value of the 'offdelayseconds' field. The number of seconds of off-delay- Parameters:
value
- the value to set.
-
getMaskedby
public String getMaskedby()
Gets the value of the 'maskedby' field.- Returns:
- The name of the parent alarm, which if active, masks this alarm (flood suppression via logical hierarchy)
-
setMaskedby
public void setMaskedby(String value)
Sets the value of the 'maskedby' field. The name of the parent alarm, which if active, masks this alarm (flood suppression via logical hierarchy)- Parameters:
value
- the value to set.
-
getScreenpath
public String getScreenpath()
Gets the value of the 'screenpath' field.- Returns:
- The path the alarm screen display
-
setScreenpath
public void setScreenpath(String value)
Sets the value of the 'screenpath' field. The path the alarm screen display- Parameters:
value
- the value to set.
-
newBuilder
public static AlarmRegistration.Builder newBuilder()
Creates a new AlarmRegistration RecordBuilder.- Returns:
- A new AlarmRegistration RecordBuilder
-
newBuilder
public static AlarmRegistration.Builder newBuilder(AlarmRegistration.Builder other)
Creates a new AlarmRegistration RecordBuilder by copying an existing Builder.- Parameters:
other
- The existing builder to copy.- Returns:
- A new AlarmRegistration RecordBuilder
-
newBuilder
public static AlarmRegistration.Builder newBuilder(AlarmRegistration other)
Creates a new AlarmRegistration RecordBuilder by copying an existing AlarmRegistration instance.- Parameters:
other
- The existing instance to copy.- Returns:
- A new AlarmRegistration RecordBuilder
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classorg.apache.avro.specific.SpecificRecordBase
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException
- Specified by:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classorg.apache.avro.specific.SpecificRecordBase
- Throws:
IOException
-
-