All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Alachisoft.NCache.DataModel.CacheConfig Maven / Gradle / Ivy

The newest version!
package Alachisoft.NCache.DataModel;

import Alachisoft.NCache.Common.Monitoring.MetricsServer.CacheMetaData;

import java.util.List;

public class CacheConfig extends CacheMetaData {

    private int id;
    private String configId;
    private String cacheId;
    private List metrics;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getConfigId() {
        return configId;
    }

    public void setConfigId(String configId) {
        this.configId = configId;
    }

    public String getCacheId() {
        return cacheId;
    }

    public void setCacheId(String cacheId) {
        this.cacheId = cacheId;
    }

    public List getMetrics() {
        return metrics;
    }

    public void setMetrics(List metrics) {
        this.metrics = metrics;
    }

    public static CacheConfig fromCacheMetaData(CacheMetaData metaData) {
        CacheConfig cacheConfig = new CacheConfig();
        cacheConfig.setCacheId(metaData.getIdentifier().getCacheId());
        cacheConfig.setClusterIP(metaData.getClusterIP());
        cacheConfig.setClientServerIP(metaData.getClientServerIP());
        cacheConfig.setClientServerPort(metaData.getClientServerPort());
        cacheConfig.setConfigId(metaData.getIdentifier().getConfigId());
        cacheConfig.setSessionID(metaData.getSessionID());
        cacheConfig.setTopology(metaData.getTopology());
        cacheConfig.setConfiguredServers(metaData.getConfiguredServers());
        cacheConfig.setCacheSize(metaData.getCacheSize());
        cacheConfig.setConfiguredServersCount(metaData.getConfiguredServersCount());
        cacheConfig.setFromReplica(metaData.isFromReplica());
        cacheConfig.setInstallationType(metaData.getInstallationType());

        return cacheConfig;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy