@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=SrvMonFactory.class, vfid=32, ofid=32, typeId=220) public final class SrvMonUserCounterStat extends Object implements com.neeve.xbuf.IXbufDesyncer, UtlPool.Item<SrvMonUserCounterStat>, ISrvMonUserCounterStat
A Counter is useful for recording an increasing value over time. Sampled periodically it can be used to derive a rate. For example a counter could be used to record a number of message received. By sampling it over time it can be used to create a received message rate.
| ADM Type | Embedded Entity |
| Factory | SrvMonFactory |
| ADM Field Summary |
|---|
| Field | Type | Id | Description |
|---|---|---|---|
| count | Long | 17 | The counter value. |
| name | String | 16 | The name of the statistic. |
| Modifier and Type | Class and Description |
|---|---|
static class |
SrvMonUserCounterStat.Field
The SrvMonUserCounterStat xbuf field (used internally when this entity is used as a field of another entity).
|
static class |
SrvMonUserCounterStat.ListField
The SrvMonUserCounterStat list field (used internally when this entity is used as an array field of another entity).
|
| Modifier and Type | Field and Description |
|---|---|
static SrvMonUserCounterStat[] |
EMPTY_ARRAY
A preallocated empty array used to avoid garbage when returning empty arrays of this type.
|
| Constructor and Description |
|---|
SrvMonUserCounterStat() |
SrvMonUserCounterStat(int initialBackingBufferSize) |
| Modifier and Type | Method and Description |
|---|---|
SrvMonUserCounterStat |
acquire() |
void |
clearContent() |
void |
clearCount()
Clears the value of 'count'.
|
void |
clearName()
Clears the value of 'name'.
|
void |
clearXRogType() |
Object |
clone()
Creates a clone of this object.
|
SrvMonUserCounterStat |
copy()
Creates a copy of this SrvMonUserCounterStat.
|
void |
copyInto(SrvMonUserCounterStat copy)
Copies the contents of this SrvMonUserCounterStat into the target.
|
static SrvMonUserCounterStat |
create() |
static SrvMonUserCounterStat |
createFrom(byte[] serializedContainer) |
static SrvMonUserCounterStat |
createFrom(byte[] serializedContainer,
com.neeve.xbuf.XbufDesyncPolicy desyncPolicy) |
static SrvMonUserCounterStat |
createFromSerializedXbufContainer(byte[] serializedContainer) |
static SrvMonUserCounterStat |
createFromSerializedXbufContainer(byte[] serializedContainer,
com.neeve.xbuf.XbufDesyncPolicy desyncPolicy) |
static com.neeve.xbuf.XbufSchema |
createSchema() |
SrvMonUserCounterStat |
deserializeFromByteArray(byte[] array) |
SrvMonUserCounterStat |
deserializeFromByteArray(byte[] array,
com.neeve.xbuf.XbufDesyncPolicy desyncPolicy) |
SrvMonUserCounterStat |
deserializeFromByteBuffer(ByteBuffer buffer) |
SrvMonUserCounterStat |
deserializeFromByteBuffer(ByteBuffer buffer,
com.neeve.xbuf.XbufDesyncPolicy desyncPolicy) |
SrvMonUserCounterStat |
deserializeFromIOElasticBuffer(com.neeve.io.IOElasticBuffer buffer,
int offset,
int length) |
SrvMonUserCounterStat |
deserializeFromIOElasticBuffer(com.neeve.io.IOElasticBuffer buffer,
int offset,
int length,
com.neeve.xbuf.XbufDesyncPolicy desyncPolicy) |
SrvMonUserCounterStat |
deserializeFromNative(long address,
int offset,
int length) |
SrvMonUserCounterStat |
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() |
long |
getCount()
Gets the value of 'count'.
|
Long |
getCountAsObject()
Gets the value of 'count'.
|
com.neeve.xbuf.XbufVariableLongField |
getCountField() |
static int |
getCountFieldId() |
static com.neeve.xbuf.XbufDesyncPolicy |
getDesyncPolicy() |
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<SrvMonUserCounterStat> |
getPool()
Get a pool item's pool.
|
int |
getSerializeToNativeLength() |
void |
getValidationErrors(List<XString> results,
String errorPrefix)
Collects validation errors into the provided list.
|
short |
getXRogType() |
Short |
getXRogTypeAsObject() |
com.neeve.xbuf.XbufVariableShortField |
getXRogTypeField() |
static int |
getXRogTypeFieldId() |
boolean |
hasCount()
Checks for the presence of 'count'.
|
boolean |
hasName()
Checks for the presence of 'name'.
|
boolean |
hasXRogType() |
SrvMonUserCounterStat |
init()
Initialize an item.
|
boolean |
isBufferBacked() |
boolean |
isDirty() |
boolean |
isReferenceCounted() |
boolean |
isValid()
Tests if this object has any validation errors.
|
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 |
setCount(long val)
Sets the value of 'count'.
|
void |
setCountAsObject(Long val)
Sets the value of 'count'.
|
void |
setCountFrom(com.neeve.xbuf.XbufVariableLongField val) |
static void |
setDesyncPolicy(com.neeve.xbuf.XbufDesyncPolicy val) |
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'.
|
SrvMonUserCounterStat |
setPool(UtlPool<SrvMonUserCounterStat> pool)
Set a pool item's pool.
|
void |
setPreserializedFields(PktBuffer buffer) |
void |
setXRogType(short val) |
void |
setXRogTypeAsObject(Short val) |
void |
setXRogTypeFrom(com.neeve.xbuf.XbufVariableShortField val) |
void |
sync() |
void |
syncFieldBitmask() |
String |
toString() |
public static final SrvMonUserCounterStat[] EMPTY_ARRAY
public SrvMonUserCounterStat()
public SrvMonUserCounterStat(int initialBackingBufferSize)
public static SrvMonUserCounterStat create()
public static SrvMonUserCounterStat createFromSerializedXbufContainer(byte[] serializedContainer, com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)
public static SrvMonUserCounterStat createFromSerializedXbufContainer(byte[] serializedContainer)
public static SrvMonUserCounterStat createFrom(byte[] serializedContainer, com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)
public static SrvMonUserCounterStat 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 getCountFieldId()
public final void setCount(long val)
ISrvMonUserCounterStatsetCount in interface ISrvMonUserCounterStatval - The value to set.public final void setCountAsObject(Long val)
ISrvMonUserCounterStatsetCountAsObject in interface ISrvMonUserCounterStatval - The value to set.public final long getCount()
ISrvMonUserCounterStatgetCount in interface ISrvMonUserCounterStatpublic final Long getCountAsObject()
ISrvMonUserCounterStatgetCountAsObject in interface ISrvMonUserCounterStatpublic final void setCountFrom(com.neeve.xbuf.XbufVariableLongField val)
public final com.neeve.xbuf.XbufVariableLongField getCountField()
public final boolean hasCount()
ISrvMonUserCounterStathasCount in interface ISrvMonUserCounterStatISrvMonUserCounterStat.getCount()public final void clearCount()
ISrvMonUserCounterStatclearCount in interface ISrvMonUserCounterStatISrvMonUserCounterStat.setCount(long)public static final int getNameFieldId()
public final void setName(String val)
ISrvMonUserCounterStatsetName in interface ISrvMonUserCounterStatval - The value to set.public final String getName()
ISrvMonUserCounterStatgetName in interface ISrvMonUserCounterStatpublic final void lendName(XString val)
ISrvMonUserCounterStatThis 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 ISrvMonUserCounterStatval - The value to set.public final void setNameFrom(long val)
ISrvMonUserCounterStat
NOTE:
This is the same as calling ISrvMonUserCounterStat.setName(String).
with Long.valueOf(val).toString(), except that using this method is a zero garbage
operation for Xbuf encoding.
setNameFrom in interface ISrvMonUserCounterStatpublic final <T extends XString> T getNameTo(XString.Factory<T> factory)
ISrvMonUserCounterStat
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 ISrvMonUserCounterStatfactory - The factory from which to get the XString to copy into and returnnull.public final void setNameFrom(XString val)
ISrvMonUserCounterStat
NOTE:
This is a Zero Garbage operation for XBuf encoded objects. Additionally, this setter
can be more efficient than ISrvMonUserCounterStat.setName(String)
because it avoids encoding the value into a String if the given XString is already encoded.
setNameFrom in interface ISrvMonUserCounterStatpublic final void getNameTo(XString val)
ISrvMonUserCounterStat
NOTE:
This is a Zero Garbage operation for XBuf encoded objects. Additionally, this getter
can be more efficient than ISrvMonUserCounterStat.getName() bec
because it can avoid decoding the value into an String.
getNameTo in interface ISrvMonUserCounterStatISrvMonUserCounterStat.getName()public final XString getNameUnsafe()
ISrvMonUserCounterStat
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 ISrvMonUserCounterStatISrvMonUserCounterStat.getName()public final void setNameFrom(com.neeve.xbuf.XbufStringField val)
public final com.neeve.xbuf.XbufStringField getNameField()
public final boolean hasName()
ISrvMonUserCounterStathasName in interface ISrvMonUserCounterStatISrvMonUserCounterStat.getName()public final void clearName()
ISrvMonUserCounterStatclearName in interface ISrvMonUserCounterStatISrvMonUserCounterStat.setName(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 SrvMonUserCounterStat deserializeFromIOElasticBuffer(com.neeve.io.IOElasticBuffer buffer, int offset, int length, com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)
public final SrvMonUserCounterStat deserializeFromIOElasticBuffer(com.neeve.io.IOElasticBuffer buffer, int offset, int length)
public final SrvMonUserCounterStat deserializeFromByteArray(byte[] array, com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)
public final SrvMonUserCounterStat deserializeFromByteArray(byte[] array)
public final SrvMonUserCounterStat deserializeFromByteBuffer(ByteBuffer buffer, com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)
public final SrvMonUserCounterStat deserializeFromByteBuffer(ByteBuffer buffer)
public final SrvMonUserCounterStat deserializeFromNative(long address, int offset, int length, com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)
public final SrvMonUserCounterStat 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 SrvMonUserCounterStat 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<SrvMonUserCounterStat>public final SrvMonUserCounterStat setPool(UtlPool<SrvMonUserCounterStat> 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<SrvMonUserCounterStat>public final UtlPool<SrvMonUserCounterStat> getPool()
UtlPool.Item
This method should return the pool set using UtlPool.Item.setPool(com.neeve.util.UtlPool<T>)
getPool in interface UtlPool.Item<SrvMonUserCounterStat>UtlPool.Item.setPool(com.neeve.util.UtlPool<T>)public final boolean isReferenceCounted()
public final SrvMonUserCounterStat acquire()
public final int getOwnerCount()
public final void dispose()
public final Object clone()
This method differs from the copy() method in that:
public final SrvMonUserCounterStat 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 SrvMonUserCounterStat's embedded entity fields.
The returned copy will be writeable even if this SrvMonUserCounterStat is read only.
public final void copyInto(SrvMonUserCounterStat 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 SrvMonUserCounterStat's embedded entity fields.
The returned copy will be writeable even if this SrvMonUserCounterStat 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.