* and the matching {@link Schema}
*/
protected QueueSpecification createSpec(final QueueName queueName,
final Schema outputSchema,
final Schema inputSchema) {
return new QueueSpecification() {
@Override
public QueueName getQueueName() {
return queueName;
}
@Override
public Schema getInputSchema() {
return inputSchema;
}
@Override
public Schema getOutputSchema() {
return outputSchema;
}
@Override
public int hashCode() {
return Objects.hashCode(getQueueName(), getInputSchema(), getOutputSchema());
}
@Override
public boolean equals(Object obj) {
if (obj == null || !(obj instanceof QueueSpecification)) {
return false;
}
QueueSpecification other = (QueueSpecification) obj;
return Objects.equal(getQueueName(), other.getQueueName())
&& Objects.equal(getInputSchema(), other.getInputSchema())
&& Objects.equal(getOutputSchema(), other.getOutputSchema());
}
@Override
public String toString() {
return queueName.toString();