@Override public boolean equals(final Object otherObject) { if (this == otherObject) { return true; } if (!(otherObject instanceof Timestamp)) { return false; } final Timestamp other = (Timestamp) otherObject; return this.instant.equals(other.instant); }
@Override public boolean equals(Object oth) { if (this==oth) return true; else if (oth==null || !getClass().isInstance(oth)) return false; StandardTransactionId id = (StandardTransactionId)oth; return instanceId.equals(id.instanceId) && transactionId==id.transactionId && transactionTime.equals(id.transactionTime); }
@Override public boolean equals(Object other) { if (this==other) return true; else if (other==null || !getClass().isInstance(other)) return false; AbstractMessage msg = (AbstractMessage)other; return timestamp.equals(msg.timestamp) && senderId.equals(msg.senderId) && content.equals(msg.content); } }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof LayerEntryTemplate)) { return false; } LayerEntryTemplate otherLayerEntryTemplate = (LayerEntryTemplate) other; return sourceFile.equals(otherLayerEntryTemplate.sourceFile) && extractionPath.equals(otherLayerEntryTemplate.extractionPath) && lastModifiedTime.equals(otherLayerEntryTemplate.lastModifiedTime) && permissions.equals(otherLayerEntryTemplate.permissions); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ConsistentKeyLockStatus other = (ConsistentKeyLockStatus) obj; if (checked != other.checked) return false; if (expire == null) { if (other.expire != null) return false; } else if (!expire.equals(other.expire)) return false; return true; } }
@Override public boolean equals(Object oth) { if (this==oth) return true; else if (oth==null || !getClass().isInstance(oth)) return false; StandardTransactionId id = (StandardTransactionId)oth; return instanceId.equals(id.instanceId) && transactionId==id.transactionId && transactionTime.equals(id.transactionTime); }
@Override public boolean equals(Object other) { if (this==other) return true; else if (other==null || !getClass().isInstance(other)) return false; AbstractMessage msg = (AbstractMessage)other; return timestamp.equals(msg.timestamp) && senderId.equals(msg.senderId) && content.equals(msg.content); } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ConsistentKeyLockStatus other = (ConsistentKeyLockStatus) obj; if (checked != other.checked) return false; if (expire == null) { return other.expire == null; } else { return expire.equals(other.expire); } } }
@Override @VisibleForTesting public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof ContainerConfiguration)) { return false; } ContainerConfiguration otherContainerConfiguration = (ContainerConfiguration) other; return creationTime.equals(otherContainerConfiguration.creationTime) && Objects.equals(entrypoint, otherContainerConfiguration.entrypoint) && Objects.equals(programArguments, otherContainerConfiguration.programArguments) && Objects.equals(environmentMap, otherContainerConfiguration.environmentMap) && Objects.equals(exposedPorts, otherContainerConfiguration.exposedPorts) && Objects.equals(labels, otherContainerConfiguration.labels) && Objects.equals(user, otherContainerConfiguration.user) && Objects.equals(workingDirectory, otherContainerConfiguration.workingDirectory); }
@Override public int compareTo(ScheduledDeadlineInfo other) { if (scheduleTime.equals(other.scheduleTime)) { return Integer.compare(counter, other.counter); } return scheduleTime.compareTo(other.scheduleTime); }
@Override public int compareTo(StubScheduleToken other) { if (scheduleTime.equals(other.scheduleTime)) { return (counter < other.counter) ? -1 : ((counter == other.counter) ? 0 : 1); } return scheduleTime.compareTo(other.scheduleTime); }
@Override public TrackingToken createTokenAt(Instant dateTime) { return events.values() .stream() .filter(event -> event.getTimestamp().equals(dateTime) || event.getTimestamp().isAfter(dateTime)) .min(Comparator.comparingLong(e -> ((GlobalSequenceTrackingToken) e.trackingToken()) .getGlobalIndex())) .map(TrackedEventMessage::trackingToken) .map(tt -> (GlobalSequenceTrackingToken) tt) .map(tt -> new GlobalSequenceTrackingToken(tt.getGlobalIndex() - 1)) .orElse(null); }
@Override public boolean attempt() { if (mAttemptCount == 0) { mAttemptCount++; return true; } Instant now = mClock.instant(); if (now.isAfter(mEndTime) || now.equals(mEndTime)) { return false; } Duration nextWaitTime = computeNextWaitTime(); if (now.plus(nextWaitTime).isAfter(mEndTime)) { nextWaitTime = Duration.between(now, mEndTime); } try { mSleeper.sleep(nextWaitTime); } catch (InterruptedException e) { Thread.currentThread().interrupt(); return false; } mAttemptCount++; return true; }
@Override public boolean isNew() { return this.getCreationTime().equals(this.getLastAccessedTime()); }
@Override public final void read(Message message) { assertNotNull(message); assertNotNull(message.getSenderId()); assertNotNull(message.getContent()); Instant now = Instant.now(); assertTrue(now.isAfter(message.getTimestamp()) || now.equals(message.getTimestamp())); processMessage(message); latch.countDown(); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || this.getClass() != obj.getClass()) { return false; } AbstractOAuth2Token that = (AbstractOAuth2Token) obj; if (!this.getTokenValue().equals(that.getTokenValue())) { return false; } if (this.getIssuedAt() != null ? !this.getIssuedAt().equals(that.getIssuedAt()) : that.getIssuedAt() != null) { return false; } return this.getExpiresAt() != null ? this.getExpiresAt().equals(that.getExpiresAt()) : that.getExpiresAt() == null; }
@Override public void read(Message message) { Instant msgTime = message.getTimestamp(); assertTrue(msgTime.isAfter(startTime) || msgTime.equals(startTime)); assertNotNull(message.getSenderId()); StaticBuffer content = message.getContent(); assertTrue(content != null && content.length() > 0); TransactionLogHeader.Entry txentry = TransactionLogHeader.parse(content, serializer, times); Instant txTime = txentry.getHeader().getTimestamp(); assertTrue(txTime.isBefore(msgTime) || txTime.equals(msgTime)); assertTrue(txTime.isAfter(startTime) || txTime.equals(msgTime)); long txid = txentry.getHeader().getId(); assertTrue(txid > 0); for (TransactionLogHeader.Modification modification : txentry.getContentAsModifications(serializer)) { assertTrue(modification.state == Change.ADDED || modification.state == Change.REMOVED); userChangeCounter.get(modification.state).incrementAndGet(); } userLogMsgCounter.incrementAndGet(); } });
@Override public void read(Message message) { final Instant msgTime = message.getTimestamp(); assertTrue(msgTime.isAfter(startTime) || msgTime.equals(startTime)); assertNotNull(message.getSenderId()); final StaticBuffer content = message.getContent(); assertTrue(content != null && content.length() > 0); final TransactionLogHeader.Entry transactionEntry = TransactionLogHeader.parse(content, serializer, times); final Instant txTime = transactionEntry.getHeader().getTimestamp(); assertTrue(txTime.isBefore(msgTime) || txTime.equals(msgTime)); assertTrue(txTime.isAfter(startTime) || txTime.equals(msgTime)); final long transactionId = transactionEntry.getHeader().getId(); assertTrue(transactionId > 0); transactionEntry.getContentAsModifications(serializer).forEach(modification -> { assertTrue(modification.state == Change.ADDED || modification.state == Change.REMOVED); userChangeCounter.get(modification.state).incrementAndGet(); }); userLogMsgCounter.incrementAndGet(); }
@Override public final void read(Message message) { assertNotNull(message); assertNotNull(message.getSenderId()); assertNotNull(message.getContent()); Instant now = Instant.now(); assertTrue(now.isAfter(message.getTimestamp()) || now.equals(message.getTimestamp())); processMessage(message); latch.countDown(); }
@Override public void read(Message message) { Instant msgTime = message.getTimestamp(); assertTrue(msgTime.isAfter(startTime) || msgTime.equals(startTime)); assertNotNull(message.getSenderId()); TransactionLogHeader.Entry txEntry = TransactionLogHeader.parse(message.getContent(), serializer, times); TransactionLogHeader header = txEntry.getHeader(); assertTrue(header.getTimestamp().isAfter(startTime) || header.getTimestamp().equals(startTime)); assertTrue(header.getTimestamp().isBefore(msgTime) || header.getTimestamp().equals(msgTime)); assertNotNull(txEntry.getMetadata()); assertNull(txEntry.getMetadata().get(LogTxMeta.GROUPNAME));