/** * Reset the content cache if necessary. * * @param inContent a <code>Content</code> value * @param inEvent an <code>Event</code> value */ private void resetOnSnapshot(Content inContent, Event inEvent) { if(inEvent instanceof HasEventType) { HasEventType hasEventType = (HasEventType)inEvent; EventType eventType = hasEventType.getEventType(); if(eventType.isSnapshot()) { boolean resetOnSnapshot = resetOnSnapshotIndicator.getUnchecked(inContent); if(resetOnSnapshot) { SLF4JLoggerProxy.debug(this, "{} cache invalidating {} on {}", instrument, inContent, inEvent); invalidate(inContent); } } boolean resetFlag = eventType.isUpdate() || eventType.isComplete(); resetOnSnapshotIndicator.put(inContent, resetFlag); } } /**
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((closeDate == null) ? 0 : closeDate.hashCode()); result = prime * result + ((closeExchange == null) ? 0 : closeExchange.hashCode()); result = prime * result + ((closePrice == null) ? 0 : closePrice.hashCode()); result = prime * result + ((highExchange == null) ? 0 : highExchange.hashCode()); result = prime * result + ((highPrice == null) ? 0 : highPrice.hashCode()); result = prime * result + ((instrument == null) ? 0 : instrument.hashCode()); result = prime * result + ((lowExchange == null) ? 0 : lowExchange.hashCode()); result = prime * result + ((lowPrice == null) ? 0 : lowPrice.hashCode()); result = prime * result + ((openExchange == null) ? 0 : openExchange.hashCode()); result = prime * result + ((openPrice == null) ? 0 : openPrice.hashCode()); result = prime * result + ((previousCloseDate == null) ? 0 : previousCloseDate.hashCode()); result = prime * result + ((previousClosePrice == null) ? 0 : previousClosePrice.hashCode()); result = prime * result + ((tradeHighTime == null) ? 0 : tradeHighTime.hashCode()); result = prime * result + ((tradeLowTime == null) ? 0 : tradeLowTime.hashCode()); result = prime * result + ((volume == null) ? 0 : volume.hashCode()); result = prime * result + ((value == null) ? 0 : value.hashCode()); result = prime * result + ((eventType == null) ? 0 : eventType.hashCode()); return result; } /* (non-Javadoc)
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((amount == null) ? 0 : amount.hashCode()); result = prime * result + ((currency == null) ? 0 : currency.hashCode()); result = prime * result + ((declareDate == null) ? 0 : declareDate.hashCode()); result = prime * result + ((equity == null) ? 0 : equity.hashCode()); result = prime * result + ((executionDate == null) ? 0 : executionDate.hashCode()); result = prime * result + ((frequency == null) ? 0 : frequency.hashCode()); result = prime * result + ((paymentDate == null) ? 0 : paymentDate.hashCode()); result = prime * result + ((recordDate == null) ? 0 : recordDate.hashCode()); result = prime * result + ((status == null) ? 0 : status.hashCode()); result = prime * result + ((type == null) ? 0 : type.hashCode()); result = prime * result + ((eventType == null) ? 0 : eventType.hashCode()); return result; } /* (non-Javadoc)
return false; } else if (!eventType.equals(other.eventType)) { return false;
return false; } else if (!eventType.equals(other.eventType)) { return false;