@Generated(value="com.neeve.adm.AdmXbufGenerator", date="Fri Dec 05 13:32:50 UTC 2025") @AdmGenerated(encoding="Xbuf", compatLevel="4.1.0", admVersion="Unknown Version", date="12/5/25 1:32 PM", buildInfo="nvx-talon-3.16.63 (nvx-codegen-plugin)") @AdmFactoryInfo(factoryClass=SrvMonCncFactory.class, vfid=36, ofid=36, typeId=301) public final class SrvMonArgumentDescription extends Object implements com.neeve.xbuf.IXbufDesyncer, UtlPool.Item<SrvMonArgumentDescription>, ISrvMonArgumentDescription
| ADM Type | Embedded Entity |
| Factory | SrvMonCncFactory |
| ADM Field Summary |
|---|
| Field | Type | Id | Description |
|---|---|---|---|
| defaultValue | String | 19 | The default value for the argument when not specified ... or not set if no default. |
| description | String | 22 | The command description. |
| displayName | String | 23 |
The display name for the argument.
If a display name is not provided then the name should be used by tools. The display name is for display purposes only and cannot be used to invoke a command. |
| name | String | 16 | The command name. |
| position | Short | 17 | The position at which the argument must be specified. |
| required | Boolean | 18 | Whether or not the argument is required. |
| type | SrvMonArgumentType |
20 | Describes the type of the argument. |
| validValues | String[] | 21 | When set restricts the set of valid values for the command. |
| Modifier and Type | Class and Description |
|---|---|
static class |
SrvMonArgumentDescription.Field
The SrvMonArgumentDescription xbuf field (used internally when this entity is used as a field of another entity).
|
static class |
SrvMonArgumentDescription.ListField
The SrvMonArgumentDescription list field (used internally when this entity is used as an array field of another entity).
|
| Modifier and Type | Field and Description |
|---|---|
static SrvMonArgumentDescription[] |
EMPTY_ARRAY
A preallocated empty array used to avoid garbage when returning empty arrays of this type.
|
| Constructor and Description |
|---|
SrvMonArgumentDescription() |
SrvMonArgumentDescription(int initialBackingBufferSize) |
| Modifier and Type | Method and Description |
|---|---|
SrvMonArgumentDescription |
acquire() |
void |
addValidValues(String val)
Adds the provided value to the list of 'validValues' values.
|
void |
clearContent() |
void |
clearDefaultValue()
Clears the value of 'defaultValue'.
|
void |
clearDescription()
Clears the value of 'description'.
|
void |
clearDisplayName()
Clears the value of 'displayName'.
|
void |
clearName()
Clears the value of 'name'.
|
void |
clearPosition()
Clears the value of 'position'.
|
void |
clearRequired()
Clears the value of 'required'.
|
void |
clearType()
Clears the value of 'type'.
|
void |
clearValidValues()
Clears the value of 'validValues'.
|
void |
clearXRogType() |
Object |
clone()
Creates a clone of this object.
|
SrvMonArgumentDescription |
copy()
Creates a copy of this SrvMonArgumentDescription.
|
void |
copyInto(SrvMonArgumentDescription copy)
Copies the contents of this SrvMonArgumentDescription into the target.
|
static SrvMonArgumentDescription |
create() |
static SrvMonArgumentDescription |
createFrom(byte[] serializedContainer) |
static SrvMonArgumentDescription |
createFrom(byte[] serializedContainer,
com.neeve.xbuf.XbufDesyncPolicy desyncPolicy) |
static SrvMonArgumentDescription |
createFromSerializedXbufContainer(byte[] serializedContainer) |
static SrvMonArgumentDescription |
createFromSerializedXbufContainer(byte[] serializedContainer,
com.neeve.xbuf.XbufDesyncPolicy desyncPolicy) |
static com.neeve.xbuf.XbufSchema |
createSchema() |
static com.neeve.xbuf.XbufRepeatedStringFieldBuffer |
createValidValuesFieldBuffer(int initialBufferLength,
boolean isNative)
Returns a wrapped buffer that can be used for doing an efficient bulk
copy from an XIterator returned for this field.
|
SrvMonArgumentDescription |
deserializeFromByteArray(byte[] array) |
SrvMonArgumentDescription |
deserializeFromByteArray(byte[] array,
com.neeve.xbuf.XbufDesyncPolicy desyncPolicy) |
SrvMonArgumentDescription |
deserializeFromByteBuffer(ByteBuffer buffer) |
SrvMonArgumentDescription |
deserializeFromByteBuffer(ByteBuffer buffer,
com.neeve.xbuf.XbufDesyncPolicy desyncPolicy) |
SrvMonArgumentDescription |
deserializeFromIOElasticBuffer(com.neeve.io.IOElasticBuffer buffer,
int offset,
int length) |
SrvMonArgumentDescription |
deserializeFromIOElasticBuffer(com.neeve.io.IOElasticBuffer buffer,
int offset,
int length,
com.neeve.xbuf.XbufDesyncPolicy desyncPolicy) |
SrvMonArgumentDescription |
deserializeFromNative(long address,
int offset,
int length) |
SrvMonArgumentDescription |
deserializeFromNative(long address,
int offset,
int length,
com.neeve.xbuf.XbufDesyncPolicy desyncPolicy) |
int |
desync(PktBuffer buffer,
int pos,
boolean frameOnly)
Desync fields from a buffer
|
void |
desyncFieldBitmask() |
void |
dispose() |
PktBuffer |
getBackingBuffer() |
String |
getDefaultValue()
Gets the value of 'defaultValue'.
|
com.neeve.xbuf.XbufStringField |
getDefaultValueField() |
static int |
getDefaultValueFieldId() |
<T extends XString> |
getDefaultValueTo(XString.Factory<T> factory)
Copies the value of this String field into a new XString from the given factory.
|
void |
getDefaultValueTo(XString val)
Copies the value of 'defaultValue' into the provided XString.
|
XString |
getDefaultValueUnsafe()
Gets the raw value of 'defaultValue'.
|
String |
getDescription()
Gets the value of 'description'.
|
com.neeve.xbuf.XbufStringField |
getDescriptionField() |
static int |
getDescriptionFieldId() |
<T extends XString> |
getDescriptionTo(XString.Factory<T> factory)
Copies the value of this String field into a new XString from the given factory.
|
void |
getDescriptionTo(XString val)
Copies the value of 'description' into the provided XString.
|
XString |
getDescriptionUnsafe()
Gets the raw value of 'description'.
|
static com.neeve.xbuf.XbufDesyncPolicy |
getDesyncPolicy() |
String |
getDisplayName()
Gets the value of 'displayName'.
|
com.neeve.xbuf.XbufStringField |
getDisplayNameField() |
static int |
getDisplayNameFieldId() |
<T extends XString> |
getDisplayNameTo(XString.Factory<T> factory)
Copies the value of this String field into a new XString from the given factory.
|
void |
getDisplayNameTo(XString val)
Copies the value of 'displayName' into the provided XString.
|
XString |
getDisplayNameUnsafe()
Gets the raw value of 'displayName'.
|
boolean |
getIsReadOnly() |
String |
getName()
Gets the value of 'name'.
|
com.neeve.xbuf.XbufStringField |
getNameField() |
static int |
getNameFieldId() |
<T extends XString> |
getNameTo(XString.Factory<T> factory)
Copies the value of this String field into a new XString from the given factory.
|
void |
getNameTo(XString val)
Copies the value of 'name' into the provided XString.
|
XString |
getNameUnsafe()
Gets the raw value of 'name'.
|
int |
getOwnerCount() |
UtlPool<SrvMonArgumentDescription> |
getPool()
Get a pool item's pool.
|
short |
getPosition()
Gets the value of 'position'.
|
Short |
getPositionAsObject()
Gets the value of 'position'.
|
com.neeve.xbuf.XbufVariableShortField |
getPositionField() |
static int |
getPositionFieldId() |
boolean |
getRequired()
Gets the value of 'required'.
|
Boolean |
getRequiredAsObject()
Gets the value of 'required'.
|
com.neeve.xbuf.XbufVariableBooleanField |
getRequiredField() |
static int |
getRequiredFieldId() |
int |
getSerializeToNativeLength() |
SrvMonArgumentType |
getType()
Gets the value of 'type'.
|
com.neeve.xbuf.XbufVariableEnumField<SrvMonArgumentType> |
getTypeField() |
static int |
getTypeFieldId() |
void |
getValidationErrors(List<XString> results,
String errorPrefix)
Collects validation errors into the provided list.
|
String[] |
getValidValues()
Gets the value of 'validValues'.
|
String[] |
getValidValuesEmptyIfNull()
Gets the value of 'validValues' or an empty array if the value is
null or not set. |
static int |
getValidValuesFieldId() |
XStringIterator |
getValidValuesIterator()
Gets the value of 'validValues' as iterator of values.
|
short |
getXRogType() |
Short |
getXRogTypeAsObject() |
com.neeve.xbuf.XbufVariableShortField |
getXRogTypeField() |
static int |
getXRogTypeFieldId() |
boolean |
hasDefaultValue()
Checks for the presence of 'defaultValue'.
|
boolean |
hasDescription()
Checks for the presence of 'description'.
|
boolean |
hasDisplayName()
Checks for the presence of 'displayName'.
|
boolean |
hasName()
Checks for the presence of 'name'.
|
boolean |
hasPosition()
Checks for the presence of 'position'.
|
boolean |
hasRequired()
Checks for the presence of 'required'.
|
boolean |
hasType()
Checks for the presence of 'type'.
|
boolean |
hasXRogType() |
SrvMonArgumentDescription |
init()
Initialize an item.
|
boolean |
isBufferBacked() |
boolean |
isDirty() |
boolean |
isReferenceCounted() |
boolean |
isValid()
Tests if this object has any validation errors.
|
void |
lendDefaultValue(XString val)
Lends the value of 'defaultValue' to this object.
|
void |
lendDescription(XString val)
Lends the value of 'description' to this object.
|
void |
lendDisplayName(XString val)
Lends the value of 'displayName' to this object.
|
void |
lendName(XString val)
Lends the value of 'name' to this object.
|
static void |
optimizeFor(int val) |
byte[] |
serializeToByteArray() |
ByteBuffer |
serializeToByteBuffer() |
com.neeve.io.IOBuffer |
serializeToIOBuffer(boolean useNative) |
int |
serializeToNative(long address,
int addressOffset) |
void |
setAsReadOnly() |
void |
setDefaultValue(String val)
Sets the value of 'defaultValue'.
|
void |
setDefaultValueFrom(long val)
Sets the value of this String field to the given numeric value.
|
void |
setDefaultValueFrom(com.neeve.xbuf.XbufStringField val) |
void |
setDefaultValueFrom(XString val)
Copies the provided XString value into this object's 'defaultValue'.
|
void |
setDescription(String val)
Sets the value of 'description'.
|
void |
setDescriptionFrom(long val)
Sets the value of this String field to the given numeric value.
|
void |
setDescriptionFrom(com.neeve.xbuf.XbufStringField val) |
void |
setDescriptionFrom(XString val)
Copies the provided XString value into this object's 'description'.
|
static void |
setDesyncPolicy(com.neeve.xbuf.XbufDesyncPolicy val) |
void |
setDisplayName(String val)
Sets the value of 'displayName'.
|
void |
setDisplayNameFrom(long val)
Sets the value of this String field to the given numeric value.
|
void |
setDisplayNameFrom(com.neeve.xbuf.XbufStringField val) |
void |
setDisplayNameFrom(XString val)
Copies the provided XString value into this object's 'displayName'.
|
static void |
setFieldInterest(List<Integer> fieldIds) |
void |
setName(String val)
Sets the value of 'name'.
|
void |
setNameFrom(long val)
Sets the value of this String field to the given numeric value.
|
void |
setNameFrom(com.neeve.xbuf.XbufStringField val) |
void |
setNameFrom(XString val)
Copies the provided XString value into this object's 'name'.
|
SrvMonArgumentDescription |
setPool(UtlPool<SrvMonArgumentDescription> pool)
Set a pool item's pool.
|
void |
setPosition(short val)
Sets the value of 'position'.
|
void |
setPositionAsObject(Short val)
Sets the value of 'position'.
|
void |
setPositionFrom(com.neeve.xbuf.XbufVariableShortField val) |
void |
setPreserializedFields(PktBuffer buffer) |
void |
setRequired(boolean val)
Sets the value of 'required'.
|
void |
setRequiredAsObject(Boolean val)
Sets the value of 'required'.
|
void |
setRequiredFrom(com.neeve.xbuf.XbufVariableBooleanField val) |
void |
setType(SrvMonArgumentType val)
Sets the value of 'type'.
|
void |
setTypeFrom(com.neeve.xbuf.XbufVariableEnumField<SrvMonArgumentType> val) |
void |
setValidValues(String[] val)
Sets the value of 'validValues'.
|
void |
setValidValuesFrom(XIterator<String> val)
Sets the value of 'validValues' using the values from the provided iterator.
|
void |
setXRogType(short val) |
void |
setXRogTypeAsObject(Short val) |
void |
setXRogTypeFrom(com.neeve.xbuf.XbufVariableShortField val) |
void |
sync() |
void |
syncFieldBitmask() |
String |
toString() |
public static final SrvMonArgumentDescription[] EMPTY_ARRAY
public SrvMonArgumentDescription()
public SrvMonArgumentDescription(int initialBackingBufferSize)
public static SrvMonArgumentDescription create()
public static SrvMonArgumentDescription createFromSerializedXbufContainer(byte[] serializedContainer, com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)
public static SrvMonArgumentDescription createFromSerializedXbufContainer(byte[] serializedContainer)
public static SrvMonArgumentDescription createFrom(byte[] serializedContainer, com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)
public static SrvMonArgumentDescription createFrom(byte[] serializedContainer)
public static final void setDesyncPolicy(com.neeve.xbuf.XbufDesyncPolicy val)
public static final com.neeve.xbuf.XbufDesyncPolicy getDesyncPolicy()
public final void clearContent()
public final void syncFieldBitmask()
public final void desyncFieldBitmask()
public final PktBuffer getBackingBuffer()
public static final void optimizeFor(int val)
public final void setAsReadOnly()
public final boolean getIsReadOnly()
public final void setPreserializedFields(PktBuffer buffer)
public static final int getXRogTypeFieldId()
public final void setXRogType(short val)
public final void setXRogTypeAsObject(Short val)
public final short getXRogType()
public final Short getXRogTypeAsObject()
public final void setXRogTypeFrom(com.neeve.xbuf.XbufVariableShortField val)
public final com.neeve.xbuf.XbufVariableShortField getXRogTypeField()
public final boolean hasXRogType()
public final void clearXRogType()
public static final int getPositionFieldId()
public final void setPosition(short val)
ISrvMonArgumentDescriptionsetPosition in interface ISrvMonArgumentDescriptionval - The value to set.public final void setPositionAsObject(Short val)
ISrvMonArgumentDescriptionsetPositionAsObject in interface ISrvMonArgumentDescriptionval - The value to set.public final short getPosition()
ISrvMonArgumentDescriptiongetPosition in interface ISrvMonArgumentDescriptionpublic final Short getPositionAsObject()
ISrvMonArgumentDescriptiongetPositionAsObject in interface ISrvMonArgumentDescriptionpublic final void setPositionFrom(com.neeve.xbuf.XbufVariableShortField val)
public final com.neeve.xbuf.XbufVariableShortField getPositionField()
public final boolean hasPosition()
ISrvMonArgumentDescriptionhasPosition in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.getPosition()public final void clearPosition()
ISrvMonArgumentDescriptionclearPosition in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.setPosition(short)public static final int getRequiredFieldId()
public final void setRequired(boolean val)
ISrvMonArgumentDescriptionsetRequired in interface ISrvMonArgumentDescriptionval - The value to set.public final void setRequiredAsObject(Boolean val)
ISrvMonArgumentDescriptionsetRequiredAsObject in interface ISrvMonArgumentDescriptionval - The value to set.public final boolean getRequired()
ISrvMonArgumentDescriptiongetRequired in interface ISrvMonArgumentDescriptionpublic final Boolean getRequiredAsObject()
ISrvMonArgumentDescriptiongetRequiredAsObject in interface ISrvMonArgumentDescriptionpublic final void setRequiredFrom(com.neeve.xbuf.XbufVariableBooleanField val)
public final com.neeve.xbuf.XbufVariableBooleanField getRequiredField()
public final boolean hasRequired()
ISrvMonArgumentDescriptionhasRequired in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.getRequired()public final void clearRequired()
ISrvMonArgumentDescriptionclearRequired in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.setRequired(boolean)public static final int getTypeFieldId()
public final void setType(SrvMonArgumentType val)
ISrvMonArgumentDescriptionsetType in interface ISrvMonArgumentDescriptionval - The value to set.public final void setTypeFrom(com.neeve.xbuf.XbufVariableEnumField<SrvMonArgumentType> val)
public final com.neeve.xbuf.XbufVariableEnumField<SrvMonArgumentType> getTypeField()
public final SrvMonArgumentType getType()
ISrvMonArgumentDescriptiongetType in interface ISrvMonArgumentDescriptionpublic final boolean hasType()
ISrvMonArgumentDescriptionhasType in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.getType()public final void clearType()
ISrvMonArgumentDescriptionclearType in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.setType(SrvMonArgumentType)public static final int getNameFieldId()
public final void setName(String val)
ISrvMonArgumentDescriptionsetName in interface ISrvMonArgumentDescriptionval - The value to set.public final String getName()
ISrvMonArgumentDescriptiongetName in interface ISrvMonArgumentDescriptionpublic final void lendName(XString val)
ISrvMonArgumentDescriptionThis method is equivalent to setName except that it allows this object to defer copying the value until this object is next serialized. This means that the caller must not modify or dispose the value being passed in to this method.
Note, also, that unlike lendXXX methods for embedded entities, this method does not attempt to acquire or dispose of the value passed in even if the value is poolable.
lendName in interface ISrvMonArgumentDescriptionval - The value to set.public final void setNameFrom(long val)
ISrvMonArgumentDescription
NOTE:
This is the same as calling ISrvMonArgumentDescription.setName(String).
with Long.valueOf(val).toString(), except that using this method is a zero garbage
operation for Xbuf encoding.
setNameFrom in interface ISrvMonArgumentDescriptionpublic final <T extends XString> T getNameTo(XString.Factory<T> factory)
ISrvMonArgumentDescription
If the value of this field is not null this method creates an XString from
the provided Factory, copies this field's value into the type, and returns the new
XString.);
This is a zero garbage operation if the provided factory is backed by a pool and the pool; has available instances;
getNameTo in interface ISrvMonArgumentDescriptionfactory - The factory from which to get the XString to copy into and returnnull.public final void setNameFrom(XString val)
ISrvMonArgumentDescription
NOTE:
This is a Zero Garbage operation for XBuf encoded objects. Additionally, this setter
can be more efficient than ISrvMonArgumentDescription.setName(String)
because it avoids encoding the value into a String if the given XString is already encoded.
setNameFrom in interface ISrvMonArgumentDescriptionpublic final void getNameTo(XString val)
ISrvMonArgumentDescription
NOTE:
This is a Zero Garbage operation for XBuf encoded objects. Additionally, this getter
can be more efficient than ISrvMonArgumentDescription.getName() bec
because it can avoid decoding the value into an String.
getNameTo in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.getName()public final XString getNameUnsafe()
ISrvMonArgumentDescription
NOTE:
This method retrieves the raw value backed by this object's buffer. This is a useful operation
when copying this field value to another object because it avoids copying the data into an intermediate
XString and instead allows direct byte transfer from the raw value to the target object.
However, this accessor is inherently unsafe because the buffer backing this object can be changed which would consequently invalidate the XString returned by this method. Consequently, the caller must not retain the returned raw value beyond the scope of this object's lifespan and access to the raw value follows the same threading rules as access to this object.
Additionally, the caller must not in any way mutate or modify the returned value as doing so could corrupt this object's backing buffer.
getNameUnsafe in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.getName()public final void setNameFrom(com.neeve.xbuf.XbufStringField val)
public final com.neeve.xbuf.XbufStringField getNameField()
public final boolean hasName()
ISrvMonArgumentDescriptionhasName in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.getName()public final void clearName()
ISrvMonArgumentDescriptionclearName in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.setName(String)public static final int getDefaultValueFieldId()
public final void setDefaultValue(String val)
ISrvMonArgumentDescriptionsetDefaultValue in interface ISrvMonArgumentDescriptionval - The value to set.public final String getDefaultValue()
ISrvMonArgumentDescriptiongetDefaultValue in interface ISrvMonArgumentDescriptionpublic final void lendDefaultValue(XString val)
ISrvMonArgumentDescriptionThis method is equivalent to setDefaultValue except that it allows this object to defer copying the value until this object is next serialized. This means that the caller must not modify or dispose the value being passed in to this method.
Note, also, that unlike lendXXX methods for embedded entities, this method does not attempt to acquire or dispose of the value passed in even if the value is poolable.
lendDefaultValue in interface ISrvMonArgumentDescriptionval - The value to set.public final void setDefaultValueFrom(long val)
ISrvMonArgumentDescription
NOTE:
This is the same as calling ISrvMonArgumentDescription.setDefaultValue(String).
with Long.valueOf(val).toString(), except that using this method is a zero garbage
operation for Xbuf encoding.
setDefaultValueFrom in interface ISrvMonArgumentDescriptionpublic final <T extends XString> T getDefaultValueTo(XString.Factory<T> factory)
ISrvMonArgumentDescription
If the value of this field is not null this method creates an XString from
the provided Factory, copies this field's value into the type, and returns the new
XString.);
This is a zero garbage operation if the provided factory is backed by a pool and the pool; has available instances;
getDefaultValueTo in interface ISrvMonArgumentDescriptionfactory - The factory from which to get the XString to copy into and returnnull.public final void setDefaultValueFrom(XString val)
ISrvMonArgumentDescription
NOTE:
This is a Zero Garbage operation for XBuf encoded objects. Additionally, this setter
can be more efficient than ISrvMonArgumentDescription.setDefaultValue(String)
because it avoids encoding the value into a String if the given XString is already encoded.
setDefaultValueFrom in interface ISrvMonArgumentDescriptionpublic final void getDefaultValueTo(XString val)
ISrvMonArgumentDescription
NOTE:
This is a Zero Garbage operation for XBuf encoded objects. Additionally, this getter
can be more efficient than ISrvMonArgumentDescription.getDefaultValue() bec
because it can avoid decoding the value into an String.
getDefaultValueTo in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.getDefaultValue()public final XString getDefaultValueUnsafe()
ISrvMonArgumentDescription
NOTE:
This method retrieves the raw value backed by this object's buffer. This is a useful operation
when copying this field value to another object because it avoids copying the data into an intermediate
XString and instead allows direct byte transfer from the raw value to the target object.
However, this accessor is inherently unsafe because the buffer backing this object can be changed which would consequently invalidate the XString returned by this method. Consequently, the caller must not retain the returned raw value beyond the scope of this object's lifespan and access to the raw value follows the same threading rules as access to this object.
Additionally, the caller must not in any way mutate or modify the returned value as doing so could corrupt this object's backing buffer.
getDefaultValueUnsafe in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.getDefaultValue()public final void setDefaultValueFrom(com.neeve.xbuf.XbufStringField val)
public final com.neeve.xbuf.XbufStringField getDefaultValueField()
public final boolean hasDefaultValue()
ISrvMonArgumentDescriptionhasDefaultValue in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.getDefaultValue()public final void clearDefaultValue()
ISrvMonArgumentDescriptionclearDefaultValue in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.setDefaultValue(String)public static final int getValidValuesFieldId()
public static final com.neeve.xbuf.XbufRepeatedStringFieldBuffer createValidValuesFieldBuffer(int initialBufferLength,
boolean isNative)
For example the following would result in a bulk transfer from this message
XbufRepeatedStringFieldBuffer preallocated = SrvMonArgumentDescription.createValidValuesFieldBuffer(1024, true); // The following would then result in a buffer copy without any iteration: preallocated.setValue(inboundMessage.getValidValuesIterator()); // The preallocated bulk copied values can then be transfered to an outbound message: outboundMessage.setValidValues.setValueFrom(preallocated);
Bulk transfer from the backing buffer may only possible between two fields with the same id (protobuf tag) because the bulk transfered bytes are in protobuf wire format which for most repeated fields encode the field's tag for each element.
initialBufferLength - the initial size of the underlying backing buffer.isNative - Whether the backing buffer should be a native or heap buffer.public final void setValidValues(String[] val)
ISrvMonArgumentDescriptionsetValidValues in interface ISrvMonArgumentDescriptionval - The value to set.public final void setValidValuesFrom(XIterator<String> val)
ISrvMonArgumentDescription
This method will call XIterator.toFirst() before and after setting the values, meaning
that all values from the iterator will be set and the iterator will be reset on return.
This method is zero garbage for Xbuf generated classes, and this method is optimized such that calling this with an iterator from another 'validValues' accessor can copy the values without iteration.
NOTE:
Passing a null or empty iterator has the same affect as calling ISrvMonArgumentDescription.setValidValues(String[]) with
a value of null.
setValidValuesFrom in interface ISrvMonArgumentDescriptionval - the values to set.public final void addValidValues(String val)
ISrvMonArgumentDescriptionThis method is zero garbage for Xbuf generated classes, and this method is optimized such that calling this with an iterator from another 'validValues' accessor can copy the values without iteration.
For objects generated with json encoding, or transactional state entities, using this method is currently efficient than doing a bulk set. For xbuf generated messages however, this method is optimized to directly serialize to an encoded backing buffer.
addValidValues in interface ISrvMonArgumentDescriptionval - the value to add.public final String[] getValidValues()
ISrvMonArgumentDescription
If the field is not set this method will return null.
getValidValues in interface ISrvMonArgumentDescriptionnull.public final String[] getValidValuesEmptyIfNull()
ISrvMonArgumentDescriptionnull or not set.
getValidValuesEmptyIfNull in interface ISrvMonArgumentDescriptionnull if not set.ISrvMonArgumentDescription.getValidValues()public final XStringIterator getValidValuesIterator()
ISrvMonArgumentDescriptionThis method will always return a non null iterator value. The returned iterator is not threadsafe, and the caller may not hold on to it beyond the pooling lifespan of this object. Depending on the implementation, the same iterator instance may be returned by this object on each call to avoid garbage. Each time this method is called the iterator is reset by calling its toFirst() method. Callers should therefore be especially careful about calling this method while iterating on the iterator returned by this method.
This method is zero garbage for Xbuf generated classes, and this method is optimized such that
passing the returned iterator to another object's setXXX(com.neeve.lang.XStringIterator) method
can perform a direct copy of the underlying values without iteration.
getValidValuesIterator in interface ISrvMonArgumentDescriptionpublic final void clearValidValues()
ISrvMonArgumentDescriptionclearValidValues in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.setValidValues(String[])public static final int getDescriptionFieldId()
public final void setDescription(String val)
ISrvMonArgumentDescriptionsetDescription in interface ISrvMonArgumentDescriptionval - The value to set.public final String getDescription()
ISrvMonArgumentDescriptiongetDescription in interface ISrvMonArgumentDescriptionpublic final void lendDescription(XString val)
ISrvMonArgumentDescriptionThis method is equivalent to setDescription except that it allows this object to defer copying the value until this object is next serialized. This means that the caller must not modify or dispose the value being passed in to this method.
Note, also, that unlike lendXXX methods for embedded entities, this method does not attempt to acquire or dispose of the value passed in even if the value is poolable.
lendDescription in interface ISrvMonArgumentDescriptionval - The value to set.public final void setDescriptionFrom(long val)
ISrvMonArgumentDescription
NOTE:
This is the same as calling ISrvMonArgumentDescription.setDescription(String).
with Long.valueOf(val).toString(), except that using this method is a zero garbage
operation for Xbuf encoding.
setDescriptionFrom in interface ISrvMonArgumentDescriptionpublic final <T extends XString> T getDescriptionTo(XString.Factory<T> factory)
ISrvMonArgumentDescription
If the value of this field is not null this method creates an XString from
the provided Factory, copies this field's value into the type, and returns the new
XString.);
This is a zero garbage operation if the provided factory is backed by a pool and the pool; has available instances;
getDescriptionTo in interface ISrvMonArgumentDescriptionfactory - The factory from which to get the XString to copy into and returnnull.public final void setDescriptionFrom(XString val)
ISrvMonArgumentDescription
NOTE:
This is a Zero Garbage operation for XBuf encoded objects. Additionally, this setter
can be more efficient than ISrvMonArgumentDescription.setDescription(String)
because it avoids encoding the value into a String if the given XString is already encoded.
setDescriptionFrom in interface ISrvMonArgumentDescriptionpublic final void getDescriptionTo(XString val)
ISrvMonArgumentDescription
NOTE:
This is a Zero Garbage operation for XBuf encoded objects. Additionally, this getter
can be more efficient than ISrvMonArgumentDescription.getDescription() bec
because it can avoid decoding the value into an String.
getDescriptionTo in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.getDescription()public final XString getDescriptionUnsafe()
ISrvMonArgumentDescription
NOTE:
This method retrieves the raw value backed by this object's buffer. This is a useful operation
when copying this field value to another object because it avoids copying the data into an intermediate
XString and instead allows direct byte transfer from the raw value to the target object.
However, this accessor is inherently unsafe because the buffer backing this object can be changed which would consequently invalidate the XString returned by this method. Consequently, the caller must not retain the returned raw value beyond the scope of this object's lifespan and access to the raw value follows the same threading rules as access to this object.
Additionally, the caller must not in any way mutate or modify the returned value as doing so could corrupt this object's backing buffer.
getDescriptionUnsafe in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.getDescription()public final void setDescriptionFrom(com.neeve.xbuf.XbufStringField val)
public final com.neeve.xbuf.XbufStringField getDescriptionField()
public final boolean hasDescription()
ISrvMonArgumentDescriptionhasDescription in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.getDescription()public final void clearDescription()
ISrvMonArgumentDescriptionclearDescription in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.setDescription(String)public static final int getDisplayNameFieldId()
public final void setDisplayName(String val)
ISrvMonArgumentDescriptionIf a display name is not provided then the name should be used by tools. The display name is for display purposes only and cannot be used to invoke a command.
setDisplayName in interface ISrvMonArgumentDescriptionval - The value to set.public final String getDisplayName()
ISrvMonArgumentDescriptionIf a display name is not provided then the name should be used by tools. The display name is for display purposes only and cannot be used to invoke a command.
getDisplayName in interface ISrvMonArgumentDescriptionpublic final void lendDisplayName(XString val)
ISrvMonArgumentDescriptionThis method is equivalent to setDisplayName except that it allows this object to defer copying the value until this object is next serialized. This means that the caller must not modify or dispose the value being passed in to this method.
If a display name is not provided then the name should be used by tools. The display name is for display purposes only and cannot be used to invoke a command.
Note, also, that unlike lendXXX methods for embedded entities, this method does not attempt to acquire or dispose of the value passed in even if the value is poolable.
lendDisplayName in interface ISrvMonArgumentDescriptionval - The value to set.public final void setDisplayNameFrom(long val)
ISrvMonArgumentDescriptionIf a display name is not provided then the name should be used by tools. The display name is for display purposes only and cannot be used to invoke a command.
NOTE:
This is the same as calling ISrvMonArgumentDescription.setDisplayName(String).
with Long.valueOf(val).toString(), except that using this method is a zero garbage
operation for Xbuf encoding.
setDisplayNameFrom in interface ISrvMonArgumentDescriptionpublic final <T extends XString> T getDisplayNameTo(XString.Factory<T> factory)
ISrvMonArgumentDescriptionIf a display name is not provided then the name should be used by tools. The display name is for display purposes only and cannot be used to invoke a command.
If the value of this field is not null this method creates an XString from
the provided Factory, copies this field's value into the type, and returns the new
XString.);
This is a zero garbage operation if the provided factory is backed by a pool and the pool; has available instances;
getDisplayNameTo in interface ISrvMonArgumentDescriptionfactory - The factory from which to get the XString to copy into and returnnull.public final void setDisplayNameFrom(XString val)
ISrvMonArgumentDescriptionIf a display name is not provided then the name should be used by tools. The display name is for display purposes only and cannot be used to invoke a command.
NOTE:
This is a Zero Garbage operation for XBuf encoded objects. Additionally, this setter
can be more efficient than ISrvMonArgumentDescription.setDisplayName(String)
because it avoids encoding the value into a String if the given XString is already encoded.
setDisplayNameFrom in interface ISrvMonArgumentDescriptionpublic final void getDisplayNameTo(XString val)
ISrvMonArgumentDescriptionIf a display name is not provided then the name should be used by tools. The display name is for display purposes only and cannot be used to invoke a command.
NOTE:
This is a Zero Garbage operation for XBuf encoded objects. Additionally, this getter
can be more efficient than ISrvMonArgumentDescription.getDisplayName() bec
because it can avoid decoding the value into an String.
getDisplayNameTo in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.getDisplayName()public final XString getDisplayNameUnsafe()
ISrvMonArgumentDescriptionIf a display name is not provided then the name should be used by tools. The display name is for display purposes only and cannot be used to invoke a command.
NOTE:
This method retrieves the raw value backed by this object's buffer. This is a useful operation
when copying this field value to another object because it avoids copying the data into an intermediate
XString and instead allows direct byte transfer from the raw value to the target object.
However, this accessor is inherently unsafe because the buffer backing this object can be changed which would consequently invalidate the XString returned by this method. Consequently, the caller must not retain the returned raw value beyond the scope of this object's lifespan and access to the raw value follows the same threading rules as access to this object.
Additionally, the caller must not in any way mutate or modify the returned value as doing so could corrupt this object's backing buffer.
getDisplayNameUnsafe in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.getDisplayName()public final void setDisplayNameFrom(com.neeve.xbuf.XbufStringField val)
public final com.neeve.xbuf.XbufStringField getDisplayNameField()
public final boolean hasDisplayName()
ISrvMonArgumentDescriptionIf a display name is not provided then the name should be used by tools. The display name is for display purposes only and cannot be used to invoke a command.
hasDisplayName in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.getDisplayName()public final void clearDisplayName()
ISrvMonArgumentDescriptionIf a display name is not provided then the name should be used by tools. The display name is for display purposes only and cannot be used to invoke a command.
clearDisplayName in interface ISrvMonArgumentDescriptionISrvMonArgumentDescription.setDisplayName(String)public final boolean isDirty()
public static final com.neeve.xbuf.XbufSchema createSchema()
public final byte[] serializeToByteArray()
public final ByteBuffer serializeToByteBuffer()
public final com.neeve.io.IOBuffer serializeToIOBuffer(boolean useNative)
public final boolean isBufferBacked()
public final int getSerializeToNativeLength()
public final int serializeToNative(long address,
int addressOffset)
public final SrvMonArgumentDescription deserializeFromIOElasticBuffer(com.neeve.io.IOElasticBuffer buffer, int offset, int length, com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)
public final SrvMonArgumentDescription deserializeFromIOElasticBuffer(com.neeve.io.IOElasticBuffer buffer, int offset, int length)
public final SrvMonArgumentDescription deserializeFromByteArray(byte[] array, com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)
public final SrvMonArgumentDescription deserializeFromByteArray(byte[] array)
public final SrvMonArgumentDescription deserializeFromByteBuffer(ByteBuffer buffer, com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)
public final SrvMonArgumentDescription deserializeFromByteBuffer(ByteBuffer buffer)
public final SrvMonArgumentDescription deserializeFromNative(long address, int offset, int length, com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)
public final SrvMonArgumentDescription deserializeFromNative(long address, int offset, int length)
public final void sync()
public final int desync(PktBuffer buffer, int pos, boolean frameOnly)
com.neeve.xbuf.IXbufDesyncerdesync in interface com.neeve.xbuf.IXbufDesyncerbuffer - The buffer to desync frompos - The position in the container's backing buffer to desync
fromframeOnly - Whether to frame the field on the underlying buffer.
See XbufField.desync(PktBuffer, int, boolean) for more
informationpublic final SrvMonArgumentDescription init()
UtlPool.ItemThis method is invoked by an item pool very time an item is put into the pool. The method should wipe the contents of the item so as to present a fresh instance of the item to the caller when retrieved from the pool.
init in interface UtlPool.Item<SrvMonArgumentDescription>public final SrvMonArgumentDescription setPool(UtlPool<SrvMonArgumentDescription> pool)
UtlPool.ItemThis method is invoked by an item pool at the time an item is added to the pool. The intent is to record the item's source pool in the item so it can be disposed back into the pool when the user is done working with it.
setPool in interface UtlPool.Item<SrvMonArgumentDescription>public final UtlPool<SrvMonArgumentDescription> getPool()
UtlPool.Item
This method should return the pool set using UtlPool.Item.setPool(com.neeve.util.UtlPool<T>)
getPool in interface UtlPool.Item<SrvMonArgumentDescription>UtlPool.Item.setPool(com.neeve.util.UtlPool<T>)public final boolean isReferenceCounted()
public final SrvMonArgumentDescription acquire()
public final int getOwnerCount()
public final void dispose()
public final Object clone()
This method differs from the copy() method in that:
public final SrvMonArgumentDescription copy()
The copy copies primitive, enum and embedded entity fields into the returned copy. Each embedded entity field is cloned so that modifications made to the copy's embedded entity fields do not affect this SrvMonArgumentDescription's embedded entity fields.
The returned copy will be writeable even if this SrvMonArgumentDescription is read only.
public final void copyInto(SrvMonArgumentDescription copy)
The copy clears the target's contents and copies primitive, enum and embedded entity fields into the provided copy. Each embedded entity field is cloned so that modifications made to the copy's embedded entity fields do not affect this SrvMonArgumentDescription's embedded entity fields.
The returned copy will be writeable even if this SrvMonArgumentDescription is read only.
copy - The target into which to copy.public final boolean isValid()
IRogValidatableisValid in interface IRogValidatablepublic final void getValidationErrors(List<XString> results, String errorPrefix)
IRogValidatablegetValidationErrors in interface IRogValidatableresults - A results list into which validation errors will be collected.errorPrefix - The bean path prefix to use when identifying invalid fields or null if validating a top level entity.Copyright © 2019 Neeve Research, LLC. All Rights Reserved.