Example #1
0
 /** {@inheritDoc} */
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result =
       (prime * result) + ((bufferStrategyConfig == null) ? 0 : bufferStrategyConfig.hashCode());
   result = (prime * result) + (classCacheExistsOnCmr ? 1231 : 1237);
   result = (prime * result) + ((configurationInfo == null) ? 0 : configurationInfo.hashCode());
   result =
       (prime * result)
           + ((exceptionSensorTypeConfig == null) ? 0 : exceptionSensorTypeConfig.hashCode());
   result =
       (prime * result)
           + ((excludeClassesPatterns == null) ? 0 : excludeClassesPatterns.hashCode());
   result =
       (prime * result)
           + ((initialInstrumentationResults == null)
               ? 0
               : initialInstrumentationResults.hashCode());
   result =
       (prime * result) + ((jmxSensorTypeConfig == null) ? 0 : jmxSensorTypeConfig.hashCode());
   result =
       (prime * result)
           + ((methodSensorTypeConfigs == null) ? 0 : methodSensorTypeConfigs.hashCode());
   result = (prime * result) + (int) (platformId ^ (platformId >>> 32));
   result =
       (prime * result)
           + ((platformSensorTypeConfigs == null) ? 0 : platformSensorTypeConfigs.hashCode());
   result =
       (prime * result) + ((sendingStrategyConfig == null) ? 0 : sendingStrategyConfig.hashCode());
   return result;
 }
Example #2
0
 /** {@inheritDoc} */
 @Override
 public boolean equals(Object obj) {
   if (this == obj) {
     return true;
   }
   if (obj == null) {
     return false;
   }
   if (getClass() != obj.getClass()) {
     return false;
   }
   AgentConfig other = (AgentConfig) obj;
   if (bufferStrategyConfig == null) {
     if (other.bufferStrategyConfig != null) {
       return false;
     }
   } else if (!bufferStrategyConfig.equals(other.bufferStrategyConfig)) {
     return false;
   }
   if (classCacheExistsOnCmr != other.classCacheExistsOnCmr) {
     return false;
   }
   if (configurationInfo == null) {
     if (other.configurationInfo != null) {
       return false;
     }
   } else if (!configurationInfo.equals(other.configurationInfo)) {
     return false;
   }
   if (exceptionSensorTypeConfig == null) {
     if (other.exceptionSensorTypeConfig != null) {
       return false;
     }
   } else if (!exceptionSensorTypeConfig.equals(other.exceptionSensorTypeConfig)) {
     return false;
   }
   if (excludeClassesPatterns == null) {
     if (other.excludeClassesPatterns != null) {
       return false;
     }
   } else if (!excludeClassesPatterns.equals(other.excludeClassesPatterns)) {
     return false;
   }
   if (initialInstrumentationResults == null) {
     if (other.initialInstrumentationResults != null) {
       return false;
     }
   } else if (!initialInstrumentationResults.equals(other.initialInstrumentationResults)) {
     return false;
   }
   if (jmxSensorTypeConfig == null) {
     if (other.jmxSensorTypeConfig != null) {
       return false;
     }
   } else if (!jmxSensorTypeConfig.equals(other.jmxSensorTypeConfig)) {
     return false;
   }
   if (methodSensorTypeConfigs == null) {
     if (other.methodSensorTypeConfigs != null) {
       return false;
     }
   } else if (!methodSensorTypeConfigs.equals(other.methodSensorTypeConfigs)) {
     return false;
   }
   if (platformId != other.platformId) {
     return false;
   }
   if (platformSensorTypeConfigs == null) {
     if (other.platformSensorTypeConfigs != null) {
       return false;
     }
   } else if (!platformSensorTypeConfigs.equals(other.platformSensorTypeConfigs)) {
     return false;
   }
   if (sendingStrategyConfig == null) {
     if (other.sendingStrategyConfig != null) {
       return false;
     }
   } else if (!sendingStrategyConfig.equals(other.sendingStrategyConfig)) {
     return false;
   }
   return true;
 }