/* * Copyright © 2017 AT&T and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.transportpce.renderer.provisiondevice.tasks; import java.util.concurrent.Callable; public abstract class RollbackTask implements Callable { private final String id; public RollbackTask(String id) { this.id = id; } public String getId() { return this.id; } @Override public boolean equals(Object object) { if (this == object) { return true; } if ((object == null) || (getClass() != object.getClass())) { return false; } RollbackTask that = (RollbackTask) object; return this.id.equals(that.id); } @Override public int hashCode() { return this.id.hashCode(); } public abstract boolean isRollbackNecessary(); }