com.neeve.server.mon
Class SrvMonPoolStats

java.lang.Object
  extended by com.neeve.server.mon.SrvMonPoolStats
All Implemented Interfaces:
IRogValidatable, ISrvMonPoolStats, UtlPool.Item<SrvMonPoolStats>, com.neeve.xbuf.IXbufDesyncer

@Generated(value="com.neeve.adm.AdmXbufGenerator",
           date="Wed Mar 28 10:54:31 EDT 2018")
@AdmGenerated(encoding="Xbuf",
              compatLevel="3.8.0",
              admVersion="nvx-adm v3.7.265 (build 0)",
              date="3/28/18 10:54 AM",
              buildInfo="nvx-talon-3.7.265 (nvx-codegen-plugin)")
@AdmFactoryInfo(factoryClass=SrvMonFactory.class,
                vfid=32,
                ofid=32,
                typeId=210)
public final class SrvMonPoolStats
extends Object
implements com.neeve.xbuf.IXbufDesyncer, UtlPool.Item<SrvMonPoolStats>, ISrvMonPoolStats

Holds stats for a pool

To keep heartbeat size under control, stats for a given pool are only included in a heartbeat if their have been pool misses in the last collection interval. Otherwise pool stats may be emitted periodically even without misses based on other criteria as well.


Nested Class Summary
static class SrvMonPoolStats.Field
          The SrvMonPoolStats xbuf field (used internally when this entity is used as a field of another entity).
static class SrvMonPoolStats.ListField
          The SrvMonPoolStats list field (used internally when this entity is used as an array field of another entity).
 
Field Summary
static SrvMonPoolStats[] EMPTY_ARRAY
          A preallocated empty array used to avoid garbage when returning empty arrays of this type.
 
Constructor Summary
SrvMonPoolStats()
           
SrvMonPoolStats(int initialBackingBufferSize)
           
 
Method Summary
 SrvMonPoolStats acquire()
           
 void clearCapacity()
          Clears the value of 'capacity' Field Description The current number of slots in the pool to hold elements that are not in use.
 void clearContent()
           
 void clearDetachedWashes()
          Clears the value of 'detachedWashes' Field Description The number of elements initialized by the detached pool washer thread.
 void clearEvicts()
          Clears the value of 'evicts' Field Description The number of elements that have been evicted from the pool because the pool doesn't have capcity.
 void clearGets()
          Clears the value of 'gets' Field Description The number of times an element has been requested from the pool.
 void clearGrowths()
          Clears the value of 'growths' Field Description The number of times the pool capacity has been increased to accomodate free elements.
 void clearHits()
          Clears the value of 'hits' Field Description The number of times an element has been requested from the pool without needing to allocate a new object.
 void clearKey()
          Clears the value of 'key' Field Description The name of the pool.
 void clearMisses()
          Clears the value of 'misses' Field Description The number of times an element has been requested from the pool which required allocating a new object.
 void clearPreallocated()
          Clears the value of 'preallocated' Field Description The number of elements initially preallocated in the pool.
 void clearPuts()
          Clears the value of 'puts' Field Description The number of times an element has been put (returned) to the pool.
 void clearSize()
          Clears the value of 'size' Field Description The number of elements currently available in the pool to satisfy gets.
 void clearXRogType()
           
 Object clone()
          Creates a clone of this object.
 SrvMonPoolStats copy()
          Creates a copy of this SrvMonPoolStats.
 void copyInto(SrvMonPoolStats copy)
          Copies the contents of this SrvMonPoolStats into the target.
static SrvMonPoolStats create()
           
static SrvMonPoolStats createFrom(byte[] serializedContainer)
           
static SrvMonPoolStats createFrom(byte[] serializedContainer, com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)
           
static SrvMonPoolStats createFromSerializedXbufContainer(byte[] serializedContainer)
           
static SrvMonPoolStats createFromSerializedXbufContainer(byte[] serializedContainer, com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)
           
static com.neeve.xbuf.XbufSchema createSchema()
           
 SrvMonPoolStats deserializeFromByteArray(byte[] array)
           
 SrvMonPoolStats deserializeFromByteArray(byte[] array, com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)
           
 SrvMonPoolStats deserializeFromByteBuffer(ByteBuffer buffer)
           
 SrvMonPoolStats deserializeFromByteBuffer(ByteBuffer buffer, com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)
           
 SrvMonPoolStats deserializeFromIOElasticBuffer(com.neeve.io.IOElasticBuffer buffer, int offset, int length)
           
 SrvMonPoolStats deserializeFromIOElasticBuffer(com.neeve.io.IOElasticBuffer buffer, int offset, int length, com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)
           
 SrvMonPoolStats deserializeFromNative(long address, int offset, int length)
           
 SrvMonPoolStats deserializeFromNative(long address, int offset, int length, com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)
           
 int desync(PktBuffer buffer, int pos, boolean frameOnly)
           
 void desyncFieldBitmask()
           
 void dispose()
           
 PktBuffer getBackingBuffer()
           
 int getCapacity()
          Gets the value of 'capacity' Field Description The current number of slots in the pool to hold elements that are not in use.
 com.neeve.xbuf.XbufVariableIntField getCapacityField()
           
static int getCapacityFieldId()
          Get the field id for 'capacity' This method can be used to set field interests.
static com.neeve.xbuf.XbufDesyncPolicy getDesyncPolicy()
           
 long getDetachedWashes()
          Gets the value of 'detachedWashes' Field Description The number of elements initialized by the detached pool washer thread.
 com.neeve.xbuf.XbufVariableLongField getDetachedWashesField()
           
static int getDetachedWashesFieldId()
          Get the field id for 'detachedWashes' This method can be used to set field interests.
 long getEvicts()
          Gets the value of 'evicts' Field Description The number of elements that have been evicted from the pool because the pool doesn't have capcity.
 com.neeve.xbuf.XbufVariableLongField getEvictsField()
           
static int getEvictsFieldId()
          Get the field id for 'evicts' This method can be used to set field interests.
 long getGets()
          Gets the value of 'gets' Field Description The number of times an element has been requested from the pool.
 com.neeve.xbuf.XbufVariableLongField getGetsField()
           
static int getGetsFieldId()
          Get the field id for 'gets' This method can be used to set field interests.
 long getGrowths()
          Gets the value of 'growths' Field Description The number of times the pool capacity has been increased to accomodate free elements.
 com.neeve.xbuf.XbufVariableLongField getGrowthsField()
           
static int getGrowthsFieldId()
          Get the field id for 'growths' This method can be used to set field interests.
 long getHits()
          Gets the value of 'hits' Field Description The number of times an element has been requested from the pool without needing to allocate a new object.
 com.neeve.xbuf.XbufVariableLongField getHitsField()
           
static int getHitsFieldId()
          Get the field id for 'hits' This method can be used to set field interests.
 boolean getIsReadOnly()
           
 String getKey()
          Gets the value of 'key' Field Description The name of the pool.
 com.neeve.xbuf.XbufStringField getKeyField()
           
static int getKeyFieldId()
          Get the field id for 'key' This method can be used to set field interests.
<T extends XString>
T
getKeyTo(XString.Factory<T> factory)
          Copies the value of this String field into a new XString from the given factory.
 void getKeyTo(XString val)
          Copies the value of 'key' into the provided XString.
 XString getKeyUnsafe()
          Gets the raw value of 'key'.
 long getMisses()
          Gets the value of 'misses' Field Description The number of times an element has been requested from the pool which required allocating a new object.
 com.neeve.xbuf.XbufVariableLongField getMissesField()
           
static int getMissesFieldId()
          Get the field id for 'misses' This method can be used to set field interests.
 int getOwnerCount()
           
 UtlPool<SrvMonPoolStats> getPool()
          Get a pool item's pool.
 int getPreallocated()
          Gets the value of 'preallocated' Field Description The number of elements initially preallocated in the pool.
 com.neeve.xbuf.XbufVariableIntField getPreallocatedField()
           
static int getPreallocatedFieldId()
          Get the field id for 'preallocated' This method can be used to set field interests.
 long getPuts()
          Gets the value of 'puts' Field Description The number of times an element has been put (returned) to the pool.
 com.neeve.xbuf.XbufVariableLongField getPutsField()
           
static int getPutsFieldId()
          Get the field id for 'puts' This method can be used to set field interests.
 int getSerializeToNativeLength()
           
 int getSize()
          Gets the value of 'size' Field Description The number of elements currently available in the pool to satisfy gets.
 com.neeve.xbuf.XbufVariableIntField getSizeField()
           
static int getSizeFieldId()
          Get the field id for 'size' This method can be used to set field interests.
 void getValidationErrors(List<XString> results, String errorPrefix)
          Collects validation errors into the provided list.
 short getXRogType()
           
 com.neeve.xbuf.XbufVariableShortField getXRogTypeField()
           
static int getXRogTypeFieldId()
          Get the field id for 'xRogType' This method can be used to set field interests.
 boolean hasCapacity()
          Checks for the presence of 'capacity' Field Description The current number of slots in the pool to hold elements that are not in use.
 boolean hasDetachedWashes()
          Checks for the presence of 'detachedWashes' Field Description The number of elements initialized by the detached pool washer thread.
 boolean hasEvicts()
          Checks for the presence of 'evicts' Field Description The number of elements that have been evicted from the pool because the pool doesn't have capcity.
 boolean hasGets()
          Checks for the presence of 'gets' Field Description The number of times an element has been requested from the pool.
 boolean hasGrowths()
          Checks for the presence of 'growths' Field Description The number of times the pool capacity has been increased to accomodate free elements.
 boolean hasHits()
          Checks for the presence of 'hits' Field Description The number of times an element has been requested from the pool without needing to allocate a new object.
 boolean hasKey()
          Checks for the presence of 'key' Field Description The name of the pool.
 boolean hasMisses()
          Checks for the presence of 'misses' Field Description The number of times an element has been requested from the pool which required allocating a new object.
 boolean hasPreallocated()
          Checks for the presence of 'preallocated' Field Description The number of elements initially preallocated in the pool.
 boolean hasPuts()
          Checks for the presence of 'puts' Field Description The number of times an element has been put (returned) to the pool.
 boolean hasSize()
          Checks for the presence of 'size' Field Description The number of elements currently available in the pool to satisfy gets.
 boolean hasXRogType()
           
 SrvMonPoolStats init()
          Initialize an item.
 boolean isBufferBacked()
           
 boolean isDirty()
           
 boolean isReferenceCounted()
           
 boolean isValid()
          Tests if this object has any validation errors.
 void lendKey(XString val)
          Sets the value of 'key' Field Description The name of the pool.
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 setCapacity(int val)
          Sets the value of 'capacity' Field Description The current number of slots in the pool to hold elements that are not in use.
 void setCapacityFrom(com.neeve.xbuf.XbufVariableIntField val)
           
static void setDesyncPolicy(com.neeve.xbuf.XbufDesyncPolicy val)
           
 void setDetachedWashes(long val)
          Sets the value of 'detachedWashes' Field Description The number of elements initialized by the detached pool washer thread.
 void setDetachedWashesFrom(com.neeve.xbuf.XbufVariableLongField val)
           
 void setEvicts(long val)
          Sets the value of 'evicts' Field Description The number of elements that have been evicted from the pool because the pool doesn't have capcity.
 void setEvictsFrom(com.neeve.xbuf.XbufVariableLongField val)
           
static void setFieldInterest(List<Integer> fieldIds)
           
 void setGets(long val)
          Sets the value of 'gets' Field Description The number of times an element has been requested from the pool.
 void setGetsFrom(com.neeve.xbuf.XbufVariableLongField val)
           
 void setGrowths(long val)
          Sets the value of 'growths' Field Description The number of times the pool capacity has been increased to accomodate free elements.
 void setGrowthsFrom(com.neeve.xbuf.XbufVariableLongField val)
           
 void setHits(long val)
          Sets the value of 'hits' Field Description The number of times an element has been requested from the pool without needing to allocate a new object.
 void setHitsFrom(com.neeve.xbuf.XbufVariableLongField val)
           
 void setKey(String val)
          Sets the value of 'key' Field Description The name of the pool.
 void setKeyFrom(long val)
          Sets the value of this String field to the given numeric value.
 void setKeyFrom(com.neeve.xbuf.XbufStringField val)
           
 void setKeyFrom(XString val)
          Copies the provided XString value into this object's 'key'.
 void setMisses(long val)
          Sets the value of 'misses' Field Description The number of times an element has been requested from the pool which required allocating a new object.
 void setMissesFrom(com.neeve.xbuf.XbufVariableLongField val)
           
 SrvMonPoolStats setPool(UtlPool<SrvMonPoolStats> pool)
          Set a pool item's pool.
 void setPreallocated(int val)
          Sets the value of 'preallocated' Field Description The number of elements initially preallocated in the pool.
 void setPreallocatedFrom(com.neeve.xbuf.XbufVariableIntField val)
           
 void setPuts(long val)
          Sets the value of 'puts' Field Description The number of times an element has been put (returned) to the pool.
 void setPutsFrom(com.neeve.xbuf.XbufVariableLongField val)
           
 void setSize(int val)
          Sets the value of 'size' Field Description The number of elements currently available in the pool to satisfy gets.
 void setSizeFrom(com.neeve.xbuf.XbufVariableIntField val)
           
 void setXRogType(short val)
           
 void setXRogTypeFrom(com.neeve.xbuf.XbufVariableShortField val)
           
 void sync()
           
 void syncFieldBitmask()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY_ARRAY

public static final SrvMonPoolStats[] EMPTY_ARRAY
A preallocated empty array used to avoid garbage when returning empty arrays of this type.

Constructor Detail

SrvMonPoolStats

public SrvMonPoolStats()

SrvMonPoolStats

public SrvMonPoolStats(int initialBackingBufferSize)
Method Detail

create

public static SrvMonPoolStats create()

createFromSerializedXbufContainer

public static SrvMonPoolStats createFromSerializedXbufContainer(byte[] serializedContainer,
                                                                com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)

createFromSerializedXbufContainer

public static SrvMonPoolStats createFromSerializedXbufContainer(byte[] serializedContainer)

createFrom

public static SrvMonPoolStats createFrom(byte[] serializedContainer,
                                         com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)

createFrom

public static SrvMonPoolStats createFrom(byte[] serializedContainer)

setDesyncPolicy

public static final void setDesyncPolicy(com.neeve.xbuf.XbufDesyncPolicy val)

getDesyncPolicy

public static final com.neeve.xbuf.XbufDesyncPolicy getDesyncPolicy()

setFieldInterest

public static final void setFieldInterest(List<Integer> fieldIds)

clearContent

public final void clearContent()

syncFieldBitmask

public final void syncFieldBitmask()

desyncFieldBitmask

public final void desyncFieldBitmask()

getBackingBuffer

public final PktBuffer getBackingBuffer()

optimizeFor

public static final void optimizeFor(int val)

setAsReadOnly

public final void setAsReadOnly()

getIsReadOnly

public final boolean getIsReadOnly()

getXRogTypeFieldId

public static final int getXRogTypeFieldId()
Get the field id for 'xRogType'

This method can be used to set field interests.

See Also:
getXRogType()

setXRogType

public final void setXRogType(short val)

getXRogType

public final short getXRogType()

setXRogTypeFrom

public final void setXRogTypeFrom(com.neeve.xbuf.XbufVariableShortField val)

getXRogTypeField

public final com.neeve.xbuf.XbufVariableShortField getXRogTypeField()

hasXRogType

public final boolean hasXRogType()

clearXRogType

public final void clearXRogType()

getPutsFieldId

public static final int getPutsFieldId()
Get the field id for 'puts'

This method can be used to set field interests.

See Also:
getPuts()

setPuts

public final void setPuts(long val)
Description copied from interface: ISrvMonPoolStats
Sets the value of 'puts'

Field Description

The number of times an element has been put (returned) to the pool.

Specified by:
setPuts in interface ISrvMonPoolStats
Parameters:
val - The value to set.

getPuts

public final long getPuts()
Description copied from interface: ISrvMonPoolStats
Gets the value of 'puts'

Field Description

The number of times an element has been put (returned) to the pool.

Specified by:
getPuts in interface ISrvMonPoolStats
Returns:
The number of times an element has been put (returned) to the pool.

setPutsFrom

public final void setPutsFrom(com.neeve.xbuf.XbufVariableLongField val)

getPutsField

public final com.neeve.xbuf.XbufVariableLongField getPutsField()

hasPuts

public final boolean hasPuts()
Description copied from interface: ISrvMonPoolStats
Checks for the presence of 'puts'

Field Description

The number of times an element has been put (returned) to the pool.

Specified by:
hasPuts in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.getPuts()

clearPuts

public final void clearPuts()
Description copied from interface: ISrvMonPoolStats
Clears the value of 'puts'

Field Description

The number of times an element has been put (returned) to the pool.

Specified by:
clearPuts in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.setPuts(long)

getGetsFieldId

public static final int getGetsFieldId()
Get the field id for 'gets'

This method can be used to set field interests.

See Also:
getGets()

setGets

public final void setGets(long val)
Description copied from interface: ISrvMonPoolStats
Sets the value of 'gets'

Field Description

The number of times an element has been requested from the pool.

Specified by:
setGets in interface ISrvMonPoolStats
Parameters:
val - The value to set.

getGets

public final long getGets()
Description copied from interface: ISrvMonPoolStats
Gets the value of 'gets'

Field Description

The number of times an element has been requested from the pool.

Specified by:
getGets in interface ISrvMonPoolStats
Returns:
The number of times an element has been requested from the pool.

setGetsFrom

public final void setGetsFrom(com.neeve.xbuf.XbufVariableLongField val)

getGetsField

public final com.neeve.xbuf.XbufVariableLongField getGetsField()

hasGets

public final boolean hasGets()
Description copied from interface: ISrvMonPoolStats
Checks for the presence of 'gets'

Field Description

The number of times an element has been requested from the pool.

Specified by:
hasGets in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.getGets()

clearGets

public final void clearGets()
Description copied from interface: ISrvMonPoolStats
Clears the value of 'gets'

Field Description

The number of times an element has been requested from the pool.

Specified by:
clearGets in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.setGets(long)

getHitsFieldId

public static final int getHitsFieldId()
Get the field id for 'hits'

This method can be used to set field interests.

See Also:
getHits()

setHits

public final void setHits(long val)
Description copied from interface: ISrvMonPoolStats
Sets the value of 'hits'

Field Description

The number of times an element has been requested from the pool without needing to allocate a new object.

Specified by:
setHits in interface ISrvMonPoolStats
Parameters:
val - The value to set.

getHits

public final long getHits()
Description copied from interface: ISrvMonPoolStats
Gets the value of 'hits'

Field Description

The number of times an element has been requested from the pool without needing to allocate a new object.

Specified by:
getHits in interface ISrvMonPoolStats
Returns:
The number of times an element has been requested from the pool without needing to allocate a new object.

setHitsFrom

public final void setHitsFrom(com.neeve.xbuf.XbufVariableLongField val)

getHitsField

public final com.neeve.xbuf.XbufVariableLongField getHitsField()

hasHits

public final boolean hasHits()
Description copied from interface: ISrvMonPoolStats
Checks for the presence of 'hits'

Field Description

The number of times an element has been requested from the pool without needing to allocate a new object.

Specified by:
hasHits in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.getHits()

clearHits

public final void clearHits()
Description copied from interface: ISrvMonPoolStats
Clears the value of 'hits'

Field Description

The number of times an element has been requested from the pool without needing to allocate a new object.

Specified by:
clearHits in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.setHits(long)

getMissesFieldId

public static final int getMissesFieldId()
Get the field id for 'misses'

This method can be used to set field interests.

See Also:
getMisses()

setMisses

public final void setMisses(long val)
Description copied from interface: ISrvMonPoolStats
Sets the value of 'misses'

Field Description

The number of times an element has been requested from the pool which required allocating a new object.

Specified by:
setMisses in interface ISrvMonPoolStats
Parameters:
val - The value to set.

getMisses

public final long getMisses()
Description copied from interface: ISrvMonPoolStats
Gets the value of 'misses'

Field Description

The number of times an element has been requested from the pool which required allocating a new object.

Specified by:
getMisses in interface ISrvMonPoolStats
Returns:
The number of times an element has been requested from the pool which required allocating a new object.

setMissesFrom

public final void setMissesFrom(com.neeve.xbuf.XbufVariableLongField val)

getMissesField

public final com.neeve.xbuf.XbufVariableLongField getMissesField()

hasMisses

public final boolean hasMisses()
Description copied from interface: ISrvMonPoolStats
Checks for the presence of 'misses'

Field Description

The number of times an element has been requested from the pool which required allocating a new object.

Specified by:
hasMisses in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.getMisses()

clearMisses

public final void clearMisses()
Description copied from interface: ISrvMonPoolStats
Clears the value of 'misses'

Field Description

The number of times an element has been requested from the pool which required allocating a new object.

Specified by:
clearMisses in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.setMisses(long)

getGrowthsFieldId

public static final int getGrowthsFieldId()
Get the field id for 'growths'

This method can be used to set field interests.

See Also:
getGrowths()

setGrowths

public final void setGrowths(long val)
Description copied from interface: ISrvMonPoolStats
Sets the value of 'growths'

Field Description

The number of times the pool capacity has been increased to accomodate free elements.

Specified by:
setGrowths in interface ISrvMonPoolStats
Parameters:
val - The value to set.

getGrowths

public final long getGrowths()
Description copied from interface: ISrvMonPoolStats
Gets the value of 'growths'

Field Description

The number of times the pool capacity has been increased to accomodate free elements.

Specified by:
getGrowths in interface ISrvMonPoolStats
Returns:
The number of times the pool capacity has been increased to accomodate free elements.

setGrowthsFrom

public final void setGrowthsFrom(com.neeve.xbuf.XbufVariableLongField val)

getGrowthsField

public final com.neeve.xbuf.XbufVariableLongField getGrowthsField()

hasGrowths

public final boolean hasGrowths()
Description copied from interface: ISrvMonPoolStats
Checks for the presence of 'growths'

Field Description

The number of times the pool capacity has been increased to accomodate free elements.

Specified by:
hasGrowths in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.getGrowths()

clearGrowths

public final void clearGrowths()
Description copied from interface: ISrvMonPoolStats
Clears the value of 'growths'

Field Description

The number of times the pool capacity has been increased to accomodate free elements.

Specified by:
clearGrowths in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.setGrowths(long)

getEvictsFieldId

public static final int getEvictsFieldId()
Get the field id for 'evicts'

This method can be used to set field interests.

See Also:
getEvicts()

setEvicts

public final void setEvicts(long val)
Description copied from interface: ISrvMonPoolStats
Sets the value of 'evicts'

Field Description

The number of elements that have been evicted from the pool because the pool doesn't have capcity.

Specified by:
setEvicts in interface ISrvMonPoolStats
Parameters:
val - The value to set.

getEvicts

public final long getEvicts()
Description copied from interface: ISrvMonPoolStats
Gets the value of 'evicts'

Field Description

The number of elements that have been evicted from the pool because the pool doesn't have capcity.

Specified by:
getEvicts in interface ISrvMonPoolStats
Returns:
The number of elements that have been evicted from the pool because the pool doesn't have capcity.

setEvictsFrom

public final void setEvictsFrom(com.neeve.xbuf.XbufVariableLongField val)

getEvictsField

public final com.neeve.xbuf.XbufVariableLongField getEvictsField()

hasEvicts

public final boolean hasEvicts()
Description copied from interface: ISrvMonPoolStats
Checks for the presence of 'evicts'

Field Description

The number of elements that have been evicted from the pool because the pool doesn't have capcity.

Specified by:
hasEvicts in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.getEvicts()

clearEvicts

public final void clearEvicts()
Description copied from interface: ISrvMonPoolStats
Clears the value of 'evicts'

Field Description

The number of elements that have been evicted from the pool because the pool doesn't have capcity.

Specified by:
clearEvicts in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.setEvicts(long)

getDetachedWashesFieldId

public static final int getDetachedWashesFieldId()
Get the field id for 'detachedWashes'

This method can be used to set field interests.

See Also:
getDetachedWashes()

setDetachedWashes

public final void setDetachedWashes(long val)
Description copied from interface: ISrvMonPoolStats
Sets the value of 'detachedWashes'

Field Description

The number of elements initialized by the detached pool washer thread.

Specified by:
setDetachedWashes in interface ISrvMonPoolStats
Parameters:
val - The value to set.

getDetachedWashes

public final long getDetachedWashes()
Description copied from interface: ISrvMonPoolStats
Gets the value of 'detachedWashes'

Field Description

The number of elements initialized by the detached pool washer thread.

Specified by:
getDetachedWashes in interface ISrvMonPoolStats
Returns:
The number of elements initialized by the detached pool washer thread.

setDetachedWashesFrom

public final void setDetachedWashesFrom(com.neeve.xbuf.XbufVariableLongField val)

getDetachedWashesField

public final com.neeve.xbuf.XbufVariableLongField getDetachedWashesField()

hasDetachedWashes

public final boolean hasDetachedWashes()
Description copied from interface: ISrvMonPoolStats
Checks for the presence of 'detachedWashes'

Field Description

The number of elements initialized by the detached pool washer thread.

Specified by:
hasDetachedWashes in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.getDetachedWashes()

clearDetachedWashes

public final void clearDetachedWashes()
Description copied from interface: ISrvMonPoolStats
Clears the value of 'detachedWashes'

Field Description

The number of elements initialized by the detached pool washer thread.

Specified by:
clearDetachedWashes in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.setDetachedWashes(long)

getSizeFieldId

public static final int getSizeFieldId()
Get the field id for 'size'

This method can be used to set field interests.

See Also:
getSize()

setSize

public final void setSize(int val)
Description copied from interface: ISrvMonPoolStats
Sets the value of 'size'

Field Description

The number of elements currently available in the pool to satisfy gets.

Note that a value of 0 does not necessarily indicate that there is a pooling issue: a healthy pool in which elements are continuously being recycled will have a size of zero frequently while the elements have been checked out by the thread using them.

Specified by:
setSize in interface ISrvMonPoolStats
Parameters:
val - The value to set.

getSize

public final int getSize()
Description copied from interface: ISrvMonPoolStats
Gets the value of 'size'

Field Description

The number of elements currently available in the pool to satisfy gets.

Note that a value of 0 does not necessarily indicate that there is a pooling issue: a healthy pool in which elements are continuously being recycled will have a size of zero frequently while the elements have been checked out by the thread using them.

Specified by:
getSize in interface ISrvMonPoolStats
Returns:
The number of elements currently available in the pool to satisfy gets.

setSizeFrom

public final void setSizeFrom(com.neeve.xbuf.XbufVariableIntField val)

getSizeField

public final com.neeve.xbuf.XbufVariableIntField getSizeField()

hasSize

public final boolean hasSize()
Description copied from interface: ISrvMonPoolStats
Checks for the presence of 'size'

Field Description

The number of elements currently available in the pool to satisfy gets.

Note that a value of 0 does not necessarily indicate that there is a pooling issue: a healthy pool in which elements are continuously being recycled will have a size of zero frequently while the elements have been checked out by the thread using them.

Specified by:
hasSize in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.getSize()

clearSize

public final void clearSize()
Description copied from interface: ISrvMonPoolStats
Clears the value of 'size'

Field Description

The number of elements currently available in the pool to satisfy gets.

Note that a value of 0 does not necessarily indicate that there is a pooling issue: a healthy pool in which elements are continuously being recycled will have a size of zero frequently while the elements have been checked out by the thread using them.

Specified by:
clearSize in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.setSize(int)

getCapacityFieldId

public static final int getCapacityFieldId()
Get the field id for 'capacity'

This method can be used to set field interests.

See Also:
getCapacity()

setCapacity

public final void setCapacity(int val)
Description copied from interface: ISrvMonPoolStats
Sets the value of 'capacity'

Field Description

The current number of slots in the pool to hold elements that are not in use.

Specified by:
setCapacity in interface ISrvMonPoolStats
Parameters:
val - The value to set.

getCapacity

public final int getCapacity()
Description copied from interface: ISrvMonPoolStats
Gets the value of 'capacity'

Field Description

The current number of slots in the pool to hold elements that are not in use.

Specified by:
getCapacity in interface ISrvMonPoolStats
Returns:
The current number of slots in the pool to hold elements that are not in use.

setCapacityFrom

public final void setCapacityFrom(com.neeve.xbuf.XbufVariableIntField val)

getCapacityField

public final com.neeve.xbuf.XbufVariableIntField getCapacityField()

hasCapacity

public final boolean hasCapacity()
Description copied from interface: ISrvMonPoolStats
Checks for the presence of 'capacity'

Field Description

The current number of slots in the pool to hold elements that are not in use.

Specified by:
hasCapacity in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.getCapacity()

clearCapacity

public final void clearCapacity()
Description copied from interface: ISrvMonPoolStats
Clears the value of 'capacity'

Field Description

The current number of slots in the pool to hold elements that are not in use.

Specified by:
clearCapacity in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.setCapacity(int)

getPreallocatedFieldId

public static final int getPreallocatedFieldId()
Get the field id for 'preallocated'

This method can be used to set field interests.

See Also:
getPreallocated()

setPreallocated

public final void setPreallocated(int val)
Description copied from interface: ISrvMonPoolStats
Sets the value of 'preallocated'

Field Description

The number of elements initially preallocated in the pool.

Specified by:
setPreallocated in interface ISrvMonPoolStats
Parameters:
val - The value to set.

getPreallocated

public final int getPreallocated()
Description copied from interface: ISrvMonPoolStats
Gets the value of 'preallocated'

Field Description

The number of elements initially preallocated in the pool.

Specified by:
getPreallocated in interface ISrvMonPoolStats
Returns:
The number of elements initially preallocated in the pool.

setPreallocatedFrom

public final void setPreallocatedFrom(com.neeve.xbuf.XbufVariableIntField val)

getPreallocatedField

public final com.neeve.xbuf.XbufVariableIntField getPreallocatedField()

hasPreallocated

public final boolean hasPreallocated()
Description copied from interface: ISrvMonPoolStats
Checks for the presence of 'preallocated'

Field Description

The number of elements initially preallocated in the pool.

Specified by:
hasPreallocated in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.getPreallocated()

clearPreallocated

public final void clearPreallocated()
Description copied from interface: ISrvMonPoolStats
Clears the value of 'preallocated'

Field Description

The number of elements initially preallocated in the pool.

Specified by:
clearPreallocated in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.setPreallocated(int)

getKeyFieldId

public static final int getKeyFieldId()
Get the field id for 'key'

This method can be used to set field interests.

See Also:
getKey()

setKey

public final void setKey(String val)
Description copied from interface: ISrvMonPoolStats
Sets the value of 'key'

Field Description

The name of the pool.

Specified by:
setKey in interface ISrvMonPoolStats
Parameters:
val - The value to set.

getKey

public final String getKey()
Description copied from interface: ISrvMonPoolStats
Gets the value of 'key'

Field Description

The name of the pool.

Specified by:
getKey in interface ISrvMonPoolStats
Returns:
The name of the pool.

lendKey

public final void lendKey(XString val)
Description copied from interface: ISrvMonPoolStats
Sets the value of 'key'

Field Description

The name of the pool.

Specified by:
lendKey in interface ISrvMonPoolStats
Parameters:
val - The value to set.

setKeyFrom

public final void setKeyFrom(long val)
Description copied from interface: ISrvMonPoolStats
Sets the value of this String field to the given numeric value.

Field Description

The name of the pool.

NOTE:
This is the same as calling ISrvMonPoolStats.setKey(String). with Long.valueOf(val).toString(), except that using this method is a zero garbage operation for Xbuf encoding.

Specified by:
setKeyFrom in interface ISrvMonPoolStats

getKeyTo

public final <T extends XString> T getKeyTo(XString.Factory<T> factory)
Description copied from interface: ISrvMonPoolStats
Copies the value of this String field into a new XString from the given factory.

Field Description

The name of the pool.

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;

Specified by:
getKeyTo in interface ISrvMonPoolStats
Parameters:
factory - The factory from which to get the XString to copy into and return
Returns:
a new XString from the provided factory if this field is set or null.

setKeyFrom

public final void setKeyFrom(XString val)
Description copied from interface: ISrvMonPoolStats
Copies the provided XString value into this object's 'key'.

Field Description

The name of the pool.

NOTE:
This is a Zero Garbage operation for XBuf encoded objects. Additionally, this setter can be more efficient than ISrvMonPoolStats.setKey(String) because it avoids encoding the value into a String if the given XString is already encoded.

Specified by:
setKeyFrom in interface ISrvMonPoolStats

getKeyTo

public final void getKeyTo(XString val)
Description copied from interface: ISrvMonPoolStats
Copies the value of 'key' into the provided XString.

Field Description

The name of the pool.

NOTE:
This is a Zero Garbage operation for XBuf encoded objects. Additionally, this getter can be more efficient than ISrvMonPoolStats.getKey() bec because it can avoid decoding the value into an String.

Specified by:
getKeyTo in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.getKey()

getKeyUnsafe

public final XString getKeyUnsafe()
Description copied from interface: ISrvMonPoolStats
Gets the raw value of 'key'.

Field Description

The name of the pool.

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.

Specified by:
getKeyUnsafe in interface ISrvMonPoolStats
Returns:
the field's raw value
See Also:
ISrvMonPoolStats.getKey()

setKeyFrom

public final void setKeyFrom(com.neeve.xbuf.XbufStringField val)

getKeyField

public final com.neeve.xbuf.XbufStringField getKeyField()

hasKey

public final boolean hasKey()
Description copied from interface: ISrvMonPoolStats
Checks for the presence of 'key'

Field Description

The name of the pool.

Specified by:
hasKey in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.getKey()

clearKey

public final void clearKey()
Description copied from interface: ISrvMonPoolStats
Clears the value of 'key'

Field Description

The name of the pool.

Specified by:
clearKey in interface ISrvMonPoolStats
See Also:
ISrvMonPoolStats.setKey(String)

isDirty

public final boolean isDirty()

createSchema

public static final com.neeve.xbuf.XbufSchema createSchema()

serializeToByteArray

public final byte[] serializeToByteArray()

serializeToByteBuffer

public final ByteBuffer serializeToByteBuffer()

serializeToIOBuffer

public final com.neeve.io.IOBuffer serializeToIOBuffer(boolean useNative)

isBufferBacked

public final boolean isBufferBacked()

getSerializeToNativeLength

public final int getSerializeToNativeLength()

serializeToNative

public final int serializeToNative(long address,
                                   int addressOffset)

deserializeFromIOElasticBuffer

public final SrvMonPoolStats deserializeFromIOElasticBuffer(com.neeve.io.IOElasticBuffer buffer,
                                                            int offset,
                                                            int length,
                                                            com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)

deserializeFromIOElasticBuffer

public final SrvMonPoolStats deserializeFromIOElasticBuffer(com.neeve.io.IOElasticBuffer buffer,
                                                            int offset,
                                                            int length)

deserializeFromByteArray

public final SrvMonPoolStats deserializeFromByteArray(byte[] array,
                                                      com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)

deserializeFromByteArray

public final SrvMonPoolStats deserializeFromByteArray(byte[] array)

deserializeFromByteBuffer

public final SrvMonPoolStats deserializeFromByteBuffer(ByteBuffer buffer,
                                                       com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)

deserializeFromByteBuffer

public final SrvMonPoolStats deserializeFromByteBuffer(ByteBuffer buffer)

deserializeFromNative

public final SrvMonPoolStats deserializeFromNative(long address,
                                                   int offset,
                                                   int length,
                                                   com.neeve.xbuf.XbufDesyncPolicy desyncPolicy)

deserializeFromNative

public final SrvMonPoolStats deserializeFromNative(long address,
                                                   int offset,
                                                   int length)

sync

public final void sync()

desync

public final int desync(PktBuffer buffer,
                        int pos,
                        boolean frameOnly)
Specified by:
desync in interface com.neeve.xbuf.IXbufDesyncer

init

public final SrvMonPoolStats init()
Description copied from interface: UtlPool.Item
Initialize an item.

This 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.

Specified by:
init in interface UtlPool.Item<SrvMonPoolStats>
Returns:
Return 'this' object for method invocation chaining.

setPool

public final SrvMonPoolStats setPool(UtlPool<SrvMonPoolStats> pool)
Description copied from interface: UtlPool.Item
Set a pool item's pool.

This 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.

Specified by:
setPool in interface UtlPool.Item<SrvMonPoolStats>
Returns:
Return 'this' object for method invocation chaining.

getPool

public final UtlPool<SrvMonPoolStats> getPool()
Description copied from interface: UtlPool.Item
Get a pool item's pool.

This method should return the pool set using UtlPool.Item.setPool(com.neeve.util.UtlPool)

Specified by:
getPool in interface UtlPool.Item<SrvMonPoolStats>
Returns:
the pool set using UtlPool.Item.setPool(com.neeve.util.UtlPool)

isReferenceCounted

public final boolean isReferenceCounted()

acquire

public final SrvMonPoolStats acquire()

getOwnerCount

public final int getOwnerCount()

dispose

public final void dispose()

clone

public final Object clone()
Creates a clone of this object.

This method differs from the copy() method in that:

Overrides:
clone in class Object

copy

public final SrvMonPoolStats copy()
Creates a copy of this SrvMonPoolStats.

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 SrvMonPoolStats's embedded entity fields.

The returned copy will be writeable even if this SrvMonPoolStats is read only.

Xbuf Pass-through Fields

When backed by a buffer, this operation copies the underlying buffer which means that if the message was deserialized from with unrecognized fields, such fields will be preserved in the copy as well.

Returns:
The copied entity.

copyInto

public final void copyInto(SrvMonPoolStats copy)
Copies the contents of this SrvMonPoolStats into the target.

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 SrvMonPoolStats's embedded entity fields.

The returned copy will be writeable even if this SrvMonPoolStats is read only.

Xbuf Pass-through Fields

When backed by a buffer, this operation copies the underlying buffer which means that if the message was deserialized from with unrecognized fields, such fields will be preserved in the copy as well.

Parameters:
copy - The target into which to copy.

isValid

public final boolean isValid()
Description copied from interface: IRogValidatable
Tests if this object has any validation errors.

Specified by:
isValid in interface IRogValidatable

getValidationErrors

public final void getValidationErrors(List<XString> results,
                                      String errorPrefix)
Description copied from interface: IRogValidatable
Collects validation errors into the provided list. It is illegal for the caller to hold onto the List of XStrings beyond the lifespace of this object.

Specified by:
getValidationErrors in interface IRogValidatable
Parameters:
results - 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.

toString

public final String toString()
Overrides:
toString in class Object


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.