/** {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((cacheEntryListenerRegistrations == null) ? 0 : cacheEntryListenerRegistrations.hashCode()); result = prime * result + ((cacheLoader == null) ? 0 : cacheLoader.hashCode()); result = prime * result + ((cacheWriter == null) ? 0 : cacheWriter.hashCode()); result = prime * result + ((cacheEntryExpiryPolicy == null) ? 0 : cacheEntryExpiryPolicy.hashCode()); result = prime * result + (isReadThrough ? 1231 : 1237); result = prime * result + (isStatisticsEnabled ? 1231 : 1237); result = prime * result + (isStoreByValue ? 1231 : 1237); result = prime * result + (isWriteThrough ? 1231 : 1237); result = prime * result + ((txnIsolationLevel == null) ? 0 : txnIsolationLevel.hashCode()); result = prime * result + ((txnMode == null) ? 0 : txnMode.hashCode()); return result; }
/** {@inheritDoc} */ @Override public boolean equals(Object object) { if (this == object) { return true; } if (object == null) { return false; } if (!(object instanceof RICacheConfiguration)) { return false; } RICacheConfiguration<?, ?> other = (RICacheConfiguration<?, ?>) object; if (cacheEntryListenerRegistrations == null) { if (other.cacheEntryListenerRegistrations != null) { return false; } } else if (!cacheEntryListenerRegistrations.equals(other.cacheEntryListenerRegistrations)) { return false; } if (cacheLoader == null) { if (other.cacheLoader != null) { return false; } } else if (!cacheLoader.equals(other.cacheLoader)) { return false; } if (cacheWriter == null) { if (other.cacheWriter != null) { return false; } } else if (!cacheWriter.equals(other.cacheWriter)) { return false; } if (cacheEntryExpiryPolicy == null) { if (other.cacheEntryExpiryPolicy != null) { return false; } } else if (!cacheEntryExpiryPolicy.equals(other.cacheEntryExpiryPolicy)) { return false; } if (isReadThrough != other.isReadThrough) { return false; } if (isStatisticsEnabled != other.isStatisticsEnabled) { return false; } if (isStoreByValue != other.isStoreByValue) { return false; } if (isWriteThrough != other.isWriteThrough) { return false; } if (isTransactionsEnabled != other.isTransactionsEnabled) { return false; } if (txnIsolationLevel != other.txnIsolationLevel) { return false; } if (txnMode != other.txnMode) { return false; } return true; }