@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof RunDuration)) { return false; } RunDuration that = (RunDuration) o; return !(duration != null ? !duration.equals(that.duration) : that.duration != null); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } KafkaSupervisorTuningConfig that = (KafkaSupervisorTuningConfig) o; if (workerThreads != null ? !workerThreads.equals(that.workerThreads) : that.workerThreads != null) { return false; } if (chatThreads != null ? !chatThreads.equals(that.chatThreads) : that.chatThreads != null) { return false; } if (chatRetries != null ? !chatRetries.equals(that.chatRetries) : that.chatRetries != null) { return false; } if (httpTimeout != null ? !httpTimeout.equals(that.httpTimeout) : that.httpTimeout != null) { return false; } if (shutdownTimeout != null ? !shutdownTimeout.equals(that.shutdownTimeout) : that.shutdownTimeout != null) { return false; } return offsetFetchPeriod != null ? offsetFetchPeriod.equals(that.offsetFetchPeriod) : that.offsetFetchPeriod == null; }
return false; if (taskDuration != null ? !taskDuration.equals(that.taskDuration) : that.taskDuration != null) { return false; return false; if (startDelay != null ? !startDelay.equals(that.startDelay) : that.startDelay != null) { return false; if (period != null ? !period.equals(that.period) : that.period != null) { return false; !completionTimeout.equals(that.completionTimeout) : that.completionTimeout != null) { return false;
final Duration refreshInterval = indexSet.getConfig().fieldTypeRefreshInterval(); if (Duration.ZERO.equals(refreshInterval)) { LOG.debug("Skipping index set with ZERO refresh interval <{}/{}>", indexSetTitle, indexSetId); return;
/** * Add the given {@link LookupDataAdapter} to the refresh service. * <p> * The {@link LookupDataAdapter#doRefresh(LookupCachePurge) refresh method} method will be called periodically * according to the {@link LookupDataAdapter#refreshInterval() refresh interval} of the data adapter. * @param dataAdapter the adapter to be added */ public void add(LookupDataAdapter dataAdapter) { if (state() == State.STOPPING || state() == State.TERMINATED) { LOG.debug("Service is in state <{}> - not adding new job for <{}/{}/@{}>", state(), dataAdapter.name(), dataAdapter.id(), objectId(dataAdapter)); return; } final Duration interval = dataAdapter.refreshInterval(); // No need to schedule the data adapter refresh if it doesn't implement a refresh if (!interval.equals(Duration.ZERO)) { // Using the adapter object ID here to make it possible to have multiple jobs for the same adapter final String instanceId = objectId(dataAdapter); // Manually synchronize here to avoid overwriting an existing refresh job for the given data adapter. // ConcurrentMap#computeIfAbsent() does not work here because scheduling a job is not idempotent. synchronized (futures) { if (!futures.containsKey(instanceId)) { LOG.info("Adding job for <{}/{}/@{}> [interval={}ms]", dataAdapter.name(), dataAdapter.id(), instanceId, interval.getMillis()); futures.put(instanceId, schedule(dataAdapter, interval)); } else { LOG.warn("Job for <{}/{}/@{}> already exists, not adding it again.", dataAdapter.name(), dataAdapter.id(), instanceId); } } } }
@Override public boolean equals(Object object) { if (object == this) { return true; } if (!(object instanceof DelayFn)) { return false; } return this.delay.equals(((DelayFn) object).delay); }
@Override public boolean equals(java.lang.Object obj) { if (this == obj) return true; if (obj == null) return false; if (this.getClass() != obj.getClass()) return false; WireDeadline other = (WireDeadline)obj; if (this.fromNow == null) { if (other.fromNow != null) { return false; } } else if (!this.fromNow.equals(other.fromNow)) { return false; } return true; }
@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); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } BaseQuery baseQuery = (BaseQuery) o; if (context != null ? !context.equals(baseQuery.context) : baseQuery.context != null) { return false; } if (dataSource != null ? !dataSource.equals(baseQuery.dataSource) : baseQuery.dataSource != null) { return false; } if (duration != null ? !duration.equals(baseQuery.duration) : baseQuery.duration != null) { return false; } if (querySegmentSpec != null ? !querySegmentSpec.equals(baseQuery.querySegmentSpec) : baseQuery.querySegmentSpec != null) { return false; } return true; }
@Override public boolean equals(final Object obj) { if(this == obj) { return true; } if(!super.equals(obj)) { return false; } if(getClass() != obj.getClass()) { return false; } final FeaturedMatches other = (FeaturedMatches)obj; if(platform == null) { if(other.platform != null) { return false; } } else if(!platform.equals(other.platform)) { return false; } if(refreshInterval == null) { if(other.refreshInterval != null) { return false; } } else if(!refreshInterval.equals(other.refreshInterval)) { return false; } return true; }
@Override public boolean equals(Object object) { if (!(object instanceof Sessions)) { return false; } Sessions other = (Sessions) object; return getGapDuration().equals(other.getGapDuration()); }
/** {@inheritDoc} */ @Override public String marshal(final Duration v) { if (v.equals(Duration.ZERO)) { return "0"; } return DEFAULT_PERIOD_FORMATTER.print(v.toPeriod().normalizedStandard()); }
private boolean triggersOncePerWindow(WindowingStrategy windowingStrategy) { Trigger trigger = windowingStrategy.getTrigger(); return !(windowingStrategy.getWindowFn() instanceof GlobalWindows) && trigger instanceof DefaultTrigger && ZERO.equals(windowingStrategy.getAllowedLateness()); }
/** * <p>getAsText</p> * * @return a {@link java.lang.String} object. */ @Override public String getAsText() { final Duration value = (Duration)getValue(); if (value.equals(Duration.ZERO)) { return "0"; } Period p = value.toPeriod().normalizedStandard(); return StringIntervalAdapter.DEFAULT_PERIOD_FORMATTER.print(p); } }
private void verifyInputWindowing(PCollection<KV<KeyT, ValueT>> input) { if (input.isBounded().equals(PCollection.IsBounded.UNBOUNDED)) { checkArgument( !input.getWindowingStrategy().equals(WindowingStrategy.globalDefault()), "Cannot work with %s and GLOBAL %s", PCollection.IsBounded.UNBOUNDED, WindowingStrategy.class.getSimpleName()); checkArgument( input.getWindowingStrategy().getTrigger().getClass().equals(DefaultTrigger.class), "Cannot work with %s trigger. Write works correctly only with %s", input.getWindowingStrategy().getTrigger().getClass().getSimpleName(), DefaultTrigger.class.getSimpleName()); checkArgument( input.getWindowingStrategy().getAllowedLateness().equals(Duration.ZERO), "Write does not allow late data."); } }
/** * Add the given {@link LookupDataAdapter} to the refresh service. * <p> * The {@link LookupDataAdapter#doRefresh(LookupCachePurge) refresh method} method will be called periodically * according to the {@link LookupDataAdapter#refreshInterval() refresh interval} of the data adapter. * @param dataAdapter the adapter to be added */ public void add(LookupDataAdapter dataAdapter) { if (state() == State.STOPPING || state() == State.TERMINATED) { LOG.debug("Service is in state <{}> - not adding new job for <{}/{}/@{}>", state(), dataAdapter.name(), dataAdapter.id(), objectId(dataAdapter)); return; } final Duration interval = dataAdapter.refreshInterval(); // No need to schedule the data adapter refresh if it doesn't implement a refresh if (!interval.equals(Duration.ZERO)) { // Using the adapter object ID here to make it possible to have multiple jobs for the same adapter final String instanceId = objectId(dataAdapter); // Manually synchronize here to avoid overwriting an existing refresh job for the given data adapter. // ConcurrentMap#computeIfAbsent() does not work here because scheduling a job is not idempotent. synchronized (futures) { if (!futures.containsKey(instanceId)) { LOG.info("Adding job for <{}/{}/@{}> [interval={}ms]", dataAdapter.name(), dataAdapter.id(), instanceId, interval.getMillis()); futures.put(instanceId, schedule(dataAdapter, interval)); } else { LOG.warn("Job for <{}/{}/@{}> already exists, not adding it again.", dataAdapter.name(), dataAdapter.id(), instanceId); } } } }
@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof KafkaIO.Read) { KafkaIO.Read<?, ?> that = (KafkaIO.Read<?, ?>) o; return (this.consumerConfig.equals(that.getConsumerConfig())) && ((this.bootstrapServers == null) ? (that.getBootstrapServers() == null) : this.bootstrapServers.equals(that.getBootstrapServers())) && ((this.topics == null) ? (that.getTopics() == null) : this.topics.equals(that.getTopics())) && (this.topicPartitions.equals(that.getTopicPartitions())) && ((this.keyCoder == null) ? (that.getKeyCoder() == null) : this.keyCoder.equals(that.getKeyCoder())) && ((this.valueCoder == null) ? (that.getValueCoder() == null) : this.valueCoder.equals(that.getValueCoder())) && ((this.keyDeserializer == null) ? (that.getKeyDeserializer() == null) : this.keyDeserializer.equals(that.getKeyDeserializer())) && ((this.valueDeserializer == null) ? (that.getValueDeserializer() == null) : this.valueDeserializer.equals(that.getValueDeserializer())) && (this.consumerFactoryFn.equals(that.getConsumerFactoryFn())) && ((this.watermarkFn == null) ? (that.getWatermarkFn() == null) : this.watermarkFn.equals(that.getWatermarkFn())) && (this.maxNumRecords == that.getMaxNumRecords()) && ((this.maxReadTime == null) ? (that.getMaxReadTime() == null) : this.maxReadTime.equals(that.getMaxReadTime())) && ((this.startReadTime == null) ? (that.getStartReadTime() == null) : this.startReadTime.equals(that.getStartReadTime())) && (this.commitOffsetsInFinalizeEnabled == that.isCommitOffsetsInFinalizeEnabled()) && (this.timestampPolicyFactory.equals(that.getTimestampPolicyFactory())) && (this.numSplits == that.getNumSplits()); } return false; }
@Override public boolean equals(Object object) { if (!(object instanceof WindowingStrategy)) { return false; } WindowingStrategy<?, ?> other = (WindowingStrategy<?, ?>) object; return isAllowedLatenessSpecified() == other.isAllowedLatenessSpecified() && isModeSpecified() == other.isModeSpecified() && isTimestampCombinerSpecified() == other.isTimestampCombinerSpecified() && getMode().equals(other.getMode()) && getAllowedLateness().equals(other.getAllowedLateness()) && getClosingBehavior().equals(other.getClosingBehavior()) && getOnTimeBehavior().equals(other.getOnTimeBehavior()) && getTrigger().equals(other.getTrigger()) && getTimestampCombiner().equals(other.getTimestampCombiner()) && getWindowFn().equals(other.getWindowFn()); }