public class WidgetConfigUpdates
extends java.lang.Object
implements java.io.Externalizable
The changed fields can be extracted from the changedAttributes
bit set: when a bit is
set to 1, the field on the bit's position was changed. To determine which is the new value for
this field, count all bits from the least significant to most significant (right to left), and
the resulted value will be an index in the updates
array. This array will contain
elements equal to the number of 1-bits in the changedAttributes
bit set.
Modifier and Type | Field and Description |
---|---|
java.util.BitSet |
changedAttributes
A bit set of changed fields.
|
java.lang.Object[] |
updates
The new field values.
|
int |
widgetId
The widget ID to which these changes belong.
|
private NativeTypeSerializer[] |
workers |
Constructor and Description |
---|
WidgetConfigUpdates()
Default c'tor.
|
WidgetConfigUpdates(int widgetId,
java.util.BitSet changedAttributes,
java.lang.Object[] updates,
NativeTypeSerializer[] workers)
Collect the information related to widget config changes, to transfer it to a remote side.
|
Modifier and Type | Method and Description |
---|---|
void |
readExternal(java.io.ObjectInput in)
Replacement for the default object reading method.
|
void |
writeExternal(java.io.ObjectOutput out)
Replacement for the default object writing method.
|
public int widgetId
public java.util.BitSet changedAttributes
updates
array, which represents the new
value for the field represented by the actual bit position.public java.lang.Object[] updates
private NativeTypeSerializer[] workers
public WidgetConfigUpdates()
public WidgetConfigUpdates(int widgetId, java.util.BitSet changedAttributes, java.lang.Object[] updates, NativeTypeSerializer[] workers)
widgetId
- The widget ID to which these changes belong.changedAttributes
- A bit set of changed fields. Counting all bits set to 1 from least significant
to most significant will produces indexes in the updates
array, which
represents the new value for the field represented by the actual bit position.updates
- An array with the new field values.public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- The output destination to which fields will be saved.java.io.IOException
- In case of I/O errors.public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
in
- The input source from which fields will be restored.java.io.IOException
- In case of I/O errors.java.lang.ClassNotFoundException
- If payload can't be instantiated.