com.alachisoft.ncache.common.monitoring.CounterMetadataCollection Maven / Gradle / Ivy
package com.alachisoft.ncache.common.monitoring;
import com.alachisoft.ncache.serialization.core.io.InternalCompactSerializable;
import com.alachisoft.ncache.serialization.standard.io.CompactReader;
import com.alachisoft.ncache.serialization.standard.io.CompactWriter;
import java.io.IOException;
public class CounterMetadataCollection implements InternalCompactSerializable {
private Publisher Category;
public final Publisher getCategory() {
return Category;
}
public final void setCategory(Publisher value) {
Category = value;
}
private java.util.ArrayList Counters;
public final java.util.ArrayList getCounters() {
return Counters;
}
public final void setCounters(java.util.ArrayList value) {
Counters = value;
}
private String Version;
public final String getVersion() {
return Version;
}
public final void setVersion(String value) {
Version = value;
}
private boolean FromReplica;
public final boolean getFromReplica() {
return FromReplica;
}
public final void setFromReplica(boolean value) {
FromReplica = value;
}
private String InstanceName;
public final String getInstanceName() {
return InstanceName;
}
public final void setInstanceName(String value) {
InstanceName = value;
}
/**
* This is to be used for bridge caches. UniqueCacheId consists of cache name + alias (Cache complete name)
*/
private String CacheUniqueID;
public final String getCacheUniqueID() {
return CacheUniqueID;
}
public final void setCacheUniqueID(String value) {
CacheUniqueID = value;
}
private String CacheConfigID;
public final String getCacheConfigID() {
return CacheConfigID;
}
public final void setCacheConfigID(String value) {
CacheConfigID = value;
}
@Override
public void Deserialize(CompactReader reader) throws IOException, ClassNotFoundException {
}
@Override
public void Serialize(CompactWriter writer) throws IOException {
writer.Write(Category.getValue());
if (Counters == null)
{
writer.Write(false);
return;
}
else
{
writer.Write(true);
writer.Write(Counters.size());
for (int i = 0; i < Counters.size(); i++)
{
writer.WriteObject(Counters.get(i));
}
}
writer.WriteObject(Version);
writer.Write(FromReplica);
writer.WriteObject(InstanceName);
writer.WriteObject(CacheUniqueID);
writer.WriteObject(CacheConfigID);
}
}