@Autowired public DefaultStorageConfigFactoryBean(InsightConfig config) { maxStoredGran = config.getMetricMaxGranularity(); }
@Override public boolean equals(Object obj) { if (obj == null) return false; if (this == obj) return true; if (getClass() != obj.getClass()) return false; InsightConfig other=(InsightConfig) obj; return (getDataExpiryMS() == other.getDataExpiryMS()) && (getDataPurgeInterval() == other.getDataPurgeInterval()) && (getMaxTraceMemory() == other.getMaxTraceMemory()) && (getDataPurgeResourceBatchSize() == other.getDataPurgeResourceBatchSize()) && (getDataPurgeTraceBatchSize() == other.getDataPurgeTraceBatchSize()) && (getMaxTracesReceivedPerMinute() == other.getMaxTracesReceivedPerMinute()) && ObjectUtil.typedEquals(getMetricMaxGranularity(), getMetricMaxGranularity()) && ObjectUtil.typedEquals(getThisServer(), other.getThisServer()) && ObjectUtil.typedEquals(getDataPurgeIntervalTime(), other.getDataPurgeIntervalTime()) && ListUtil.compareCollections(getExcludeTraceByPath(), other.getExcludeTraceByPath()) && (FileUtil.compareByAbsolutePath(getConfigDir(), other.getConfigDir()) == 0) && (FileUtil.compareByAbsolutePath(getDataDir(), other.getDataDir()) == 0) ; }
@Override public int hashCode() { return MathUtil.hashValue(getDataExpiryMS()) + MathUtil.hashValue(getDataPurgeInterval()) + MathUtil.hashValue(getMaxTraceMemory()) + getDataPurgeResourceBatchSize() + getDataPurgeTraceBatchSize() + getMaxTracesReceivedPerMinute() + ObjectUtil.hashCode(getMetricMaxGranularity()) + ObjectUtil.hashCode(getThisServer()) + ObjectUtil.hashCode(getDataPurgeIntervalTime()) + ListUtil.size(getExcludeTraceByPath()) // NOT using the hash since order may vary // NOT included in hash since absolute name may vary ... getConfigDir().hashCode() // NOT included in hash since absolute name may vary ... getDataDir().hashCode() ; }