@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof PollingLookupFactory)) { return false; } PollingLookupFactory that = (PollingLookupFactory) o; if (pollPeriod != null ? !pollPeriod.equals(that.pollPeriod) : that.pollPeriod != null) { return false; } if (dataFetcher != null ? !dataFetcher.equals(that.dataFetcher) : that.dataFetcher != null) { return false; } return cacheFactory != null ? (that.cacheFactory != null && cacheFactory.getClass() == (that.cacheFactory).getClass()) : that.cacheFactory == null; } }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } PeriodGranularity that = (PeriodGranularity) o; if (origin != that.origin) { return false; } if (hasOrigin != that.hasOrigin) { return false; } if (isCompound != that.isCompound) { return false; } if (!period.equals(that.period)) { return false; } return chronology.equals(that.chronology); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } PeriodGranularity that = (PeriodGranularity) o; if (hasOrigin != that.hasOrigin) { return false; } if (origin != that.origin) { return false; } if (!chronology.equals(that.chronology)) { return false; } if (!period.equals(that.period)) { return false; } return true; }
return false; if (!taskAssignmentTimeout.equals(that.taskAssignmentTimeout)) { return false; if (!taskCleanupTimeout.equals(that.taskCleanupTimeout)) { return false; return false; if (!taskShutdownLinkTimeout.equals(that.taskShutdownLinkTimeout)) { return false; return false; if (!workerBlackListBackoffTime.equals(that.getWorkerBlackListBackoffTime())) { return false; return false; return workerBlackListCleanupPeriod.equals(that.workerBlackListCleanupPeriod);
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } PeriodGranularity that = (PeriodGranularity) o; if (hasOrigin != that.hasOrigin) { return false; } if (origin != that.origin) { return false; } if (!chronology.equals(that.chronology)) { return false; } if (!period.equals(that.period)) { return false; } return true; }
@JsonCreator public PeriodGranularity( @JsonProperty("period") Period period, @JsonProperty("origin") DateTime origin, @JsonProperty("timeZone") DateTimeZone tz ) { this.period = Preconditions.checkNotNull(period, "period can't be null!"); Preconditions.checkArgument(!Period.ZERO.equals(period), "zero period is not acceptable in QueryGranularity!"); this.chronology = tz == null ? ISOChronology.getInstanceUTC() : ISOChronology.getInstance(tz); if (origin == null) { // default to origin in given time zone when aligning multi-period granularities this.origin = new DateTime(0, DateTimeZone.UTC).withZoneRetainFields(chronology.getZone()).getMillis(); this.hasOrigin = false; } else { this.origin = origin.getMillis(); this.hasOrigin = true; } this.isCompound = isCompoundPeriod(period); }
!intermediatePersistPeriod.equals(that.intermediatePersistPeriod) : that.intermediatePersistPeriod != null) { return false;
protected org.graylog2.plugin.indexer.searches.timeranges.TimeRange restrictTimeRange(final org.graylog2.plugin.indexer.searches.timeranges.TimeRange timeRange) { final DateTime originalFrom = timeRange.getFrom(); final DateTime to = timeRange.getTo(); final DateTime from; final SearchesClusterConfig config = clusterConfigService.get(SearchesClusterConfig.class); if (config == null || Period.ZERO.equals(config.queryTimeRangeLimit())) { from = originalFrom; } else { final DateTime limitedFrom = to.minus(config.queryTimeRangeLimit()); from = limitedFrom.isAfter(originalFrom) ? limitedFrom : originalFrom; } return AbsoluteRange.create(from, to); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } UriExtractionNamespace that = (UriExtractionNamespace) o; if (getUri() != null ? !getUri().equals(that.getUri()) : that.getUri() != null) { return false; } if (getUriPrefix() != null ? !getUriPrefix().equals(that.getUriPrefix()) : that.getUriPrefix() != null) { return false; } if (!getNamespaceParseSpec().equals(that.getNamespaceParseSpec())) { return false; } if (getFileRegex() != null ? !getFileRegex().equals(that.getFileRegex()) : that.getFileRegex() != null) { return false; } return pollPeriod.equals(that.pollPeriod); }
if (granularity.getPeriod().equals(Period.days(1))) { final TimestampFloorExprMacro.TimestampFloorExpr floorExpr = Expressions.asTimestampFloorExpr( input,
if (!unsupported.equals(Period.ZERO)) { t = new RelativeTime(p, new DurationWithFields(unsupported)); t.approx = this.approx;
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; YearMonthDuration other = (YearMonthDuration) obj; if (duration == null) { if (other.duration != null) return false; } else if (!duration.equals(other.duration)) return false; if (negative != other.negative) return false; return true; }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } return period.equals(((WallTime) o).asPeriod()); }
String input = "24:00:00"; DateTimeFormatter dtf = DateTimeFormatter.ofPattern("HH:mm:ss"); TemporalAccessor raw = dtf.parse(input); int hour = raw.query(LocalTime::from).getHour(); Period period = raw.query(DateTimeFormatter.parsedExcessDays()); if (period.equals(Period.ofDays(1))) { hour = 24; } System.out.println("iso-hour=" + hour); // output: iso-hour=24
@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof TimeBasedRotationStrategyConfig) { TimeBasedRotationStrategyConfig that = (TimeBasedRotationStrategyConfig) o; return (this.type.equals(that.type())) && (this.rotationPeriod.equals(that.rotationPeriod())); } return false; }
@JsonCreator public PeriodGranularity( @JsonProperty("period") Period period, @JsonProperty("origin") DateTime origin, @JsonProperty("timeZone") DateTimeZone tz ) { this.period = Preconditions.checkNotNull(period, "period can't be null!"); Preconditions.checkArgument(!Period.ZERO.equals(period), "zero period is not acceptable in QueryGranularity!"); this.chronology = tz == null ? ISOChronology.getInstanceUTC() : ISOChronology.getInstance(tz); if (origin == null) { // default to origin in given time zone when aligning multi-period granularities this.origin = new DateTime(0, DateTimeZone.UTC).withZoneRetainFields(chronology.getZone()).getMillis(); this.hasOrigin = false; } else { this.origin = origin.getMillis(); this.hasOrigin = true; } this.isCompound = isCompoundPeriod(period); }
@JsonCreator public PeriodGranularity( @JsonProperty("period") Period period, @JsonProperty("origin") DateTime origin, @JsonProperty("timeZone") DateTimeZone tz ) { this.period = Preconditions.checkNotNull(period, "period can't be null!"); Preconditions.checkArgument(!Period.ZERO.equals(period), "zero period is not acceptable in QueryGranularity!"); this.chronology = tz == null ? ISOChronology.getInstanceUTC() : ISOChronology.getInstance(tz); if (origin == null) { // default to origin in given time zone when aligning multi-period granularities this.origin = new DateTime(0, DateTimeZone.UTC).withZoneRetainFields(chronology.getZone()).getMillis(); this.hasOrigin = false; } else { this.origin = origin.getMillis(); this.hasOrigin = true; } this.isCompound = isCompoundPeriod(period); }
@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof TimeBasedRotationStrategyResponse) { TimeBasedRotationStrategyResponse that = (TimeBasedRotationStrategyResponse) o; return (this.type.equals(that.type())) && (this.maxNumberOfIndices == that.maxNumberOfIndices()) && (this.maxTimePerIndex.equals(that.maxTimePerIndex())); } return false; }
@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof SearchesClusterConfig) { SearchesClusterConfig that = (SearchesClusterConfig) o; return (this.queryTimeRangeLimit.equals(that.queryTimeRangeLimit())) && (this.relativeTimerangeOptions.equals(that.relativeTimerangeOptions())) && (this.surroundingTimerangeOptions.equals(that.surroundingTimerangeOptions())) && (this.surroundingFilterFields.equals(that.surroundingFilterFields())) && (this.analysisDisabledFields.equals(that.analysisDisabledFields())); } return false; }
protected org.graylog2.plugin.indexer.searches.timeranges.TimeRange restrictTimeRange(final org.graylog2.plugin.indexer.searches.timeranges.TimeRange timeRange) { final DateTime originalFrom = timeRange.getFrom(); final DateTime to = timeRange.getTo(); final DateTime from; final SearchesClusterConfig config = clusterConfigService.get(SearchesClusterConfig.class); if (config == null || Period.ZERO.equals(config.queryTimeRangeLimit())) { from = originalFrom; } else { final DateTime limitedFrom = to.minus(config.queryTimeRangeLimit()); from = limitedFrom.isAfter(originalFrom) ? limitedFrom : originalFrom; } return AbsoluteRange.create(from, to); }