return false; } else if (!cutoverInstant.equals(other.cutoverInstant)) { return false;
return false; } else if (!cutoverInstant.equals(other.cutoverInstant)) { return false;
chrono = chronos.get(i); if (minDaysInFirstWeek == chrono.getMinimumDaysInFirstWeek() && cutoverInstant.equals(chrono.getGregorianCutover())) {
public boolean equals(Object x, Object y) throws HibernateException { if (x == y) { return true; } if (x == null || y == null) { return false; } Instant ix = (Instant) x; Instant iy = (Instant) y; return ix.equals(iy); }
public boolean equals(Object x, Object y) throws HibernateException { if (x == y) { return true; } if (x == null || y == null) { return false; } Instant ix = (Instant) x; Instant iy = (Instant) y; return ix.equals(iy); }
public boolean equals(Object x, Object y) throws HibernateException { if (x == y) { return true; } if (x == null || y == null) { return false; } Instant ix = (Instant) x; Instant iy = (Instant) y; return ix.equals(iy); }
public boolean equals(Object x, Object y) throws HibernateException { if (x == y) { return true; } if (x == null || y == null) { return false; } Instant ix = (Instant) x; Instant iy = (Instant) y; return ix.equals(iy); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj instanceof Run) { Run that = (Run) obj; return this.id.equals(that.id) && this.label.equals(that.label) && this.startTime.equals(that.startTime); } else { return false; } }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj instanceof Run) { Run that = (Run) obj; return this.id.equals(that.id) && this.label.equals(that.label) && this.startTime.equals(that.startTime); } else { return false; } }
@Override public boolean equals(final Object o) { if (o instanceof TicketState) { final TicketState other = (TicketState) o; return sessId.equals(other.sessId) && authenticatedPrincipalName.equals(other.authenticatedPrincipalName) && authenticationInstant.equals(other.authenticationInstant) && authenticationMethod.equals(other.authenticationMethod); } return false; }
public static String formatTime(Instant timestamp) { if (timestamp == null) { return "null"; } else if (timestamp.equals(BoundedWindow.TIMESTAMP_MIN_VALUE)) { return "TIMESTAMP_MIN_VALUE"; } else if (timestamp.equals(BoundedWindow.TIMESTAMP_MAX_VALUE)) { return "TIMESTAMP_MAX_VALUE"; } else if (timestamp.equals(GlobalWindow.INSTANCE.maxTimestamp())) { return "END_OF_GLOBAL_WINDOW"; } else { return timestamp.toString(TIME_FMT); } }
@Override public boolean equals(Object object) { if (object == this) { return true; } if (!(object instanceof AlignFn)) { return false; } AlignFn other = (AlignFn) object; return other.size.equals(this.size) && other.offset.equals(this.offset); }
private Visit findGoal(Instant timestamp, Iterable<Visit> goals) { for (Visit goal : goals) { if (timestamp.equals(goal.timestamp())) { return goal; } } return null; }
public boolean shouldFire(Instant currentWatermark) { return currentWatermark.isAfter(fireAfter) || currentWatermark.equals(BoundedWindow.TIMESTAMP_MAX_VALUE); }
public boolean shouldFire(Instant currentWatermark) { return currentWatermark.isAfter(fireAfter) || currentWatermark.equals(BoundedWindow.TIMESTAMP_MAX_VALUE); }
/** * Returns a {@code WindowedValue} with the given value and timestamp, {@code GlobalWindow} and * default pane. */ public static <T> WindowedValue<T> timestampedValueInGlobalWindow(T value, Instant timestamp) { if (BoundedWindow.TIMESTAMP_MIN_VALUE.equals(timestamp)) { return valueInGlobalWindow(value); } else { return new TimestampedValueInGlobalWindow<>(value, timestamp, PaneInfo.NO_FIRING); } }
/** * Formats a {@link Instant} timestamp with additional Beam-specific metadata, such as indicating * whether the timestamp is the end of the global window or one of the distinguished values {@link * #TIMESTAMP_MIN_VALUE} or {@link #TIMESTAMP_MIN_VALUE}. */ public static String formatTimestamp(Instant timestamp) { if (timestamp.equals(TIMESTAMP_MIN_VALUE)) { return timestamp.toString() + " (TIMESTAMP_MIN_VALUE)"; } else if (timestamp.equals(TIMESTAMP_MAX_VALUE)) { return timestamp.toString() + " (TIMESTAMP_MAX_VALUE)"; } else if (timestamp.equals(GlobalWindow.INSTANCE.maxTimestamp())) { return timestamp.toString() + " (end of global window)"; } else { return timestamp.toString(); } }
@Override public boolean isForWindow( String timerId, BoundedWindow window, Instant timestamp, TimeDomain timeDomain) { boolean isEventTimer = timeDomain.equals(TimeDomain.EVENT_TIME); Instant gcTime = LateDataUtils.garbageCollectionTime(window, windowingStrategy); gcTime = gcTime.plus(GC_DELAY_MS); return isEventTimer && GC_TIMER_ID.equals(timerId) && gcTime.equals(timestamp); } }
@Override public Instant getTimestampForRecord(PartitionContext context, KafkaRecord<K, V> record) { if (record.getTimestampType().equals(KafkaTimestampType.LOG_APPEND_TIME)) { currentWatermark = new Instant(record.getTimestamp()); } else if (currentWatermark.equals(BoundedWindow.TIMESTAMP_MIN_VALUE)) { // This is the first record and it does not have LOG_APPEND_TIME. // Most likely the topic is not configured correctly. throw new IllegalStateException( String.format( "LogAppendTimePolicy policy is enabled in reader, but Kafka record's timestamp type " + "is LogAppendTime. Most likely it is not enabled on Kafka for the topic '%s'. " + "Actual timestamp type is '%s'.", record.getTopic(), record.getTimestampType())); } return currentWatermark; }
/** Returns a {@code WindowedValue} with the given value, timestamp, and window. */ public static <T> WindowedValue<T> of( T value, Instant timestamp, BoundedWindow window, PaneInfo pane) { checkArgument(pane != null, "WindowedValue requires PaneInfo, but it was null"); boolean isGlobal = GlobalWindow.INSTANCE.equals(window); if (isGlobal && BoundedWindow.TIMESTAMP_MIN_VALUE.equals(timestamp)) { return valueInGlobalWindow(value, pane); } else if (isGlobal) { return new TimestampedValueInGlobalWindow<>(value, timestamp, pane); } else { return new TimestampedValueInSingleWindow<>(value, timestamp, window, pane); } }