org.nuiton.topia.replication.TopiaReplicationOperationUndoable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of topia-service-replication Show documentation
Show all versions of topia-service-replication Show documentation
Hibernate based replication service
package org.nuiton.topia.replication;
/*
* #%L
* ToPIA :: Service Replication
* $Id$
* $HeadURL$
* %%
* Copyright (C) 2004 - 2014 CodeLutin
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* .
* #L%
*/
import org.nuiton.topia.persistence.TopiaPersistenceContext;
import org.nuiton.topia.replication.model.ReplicationOperationDef;
/**
* Le contrat d'une operation {@link TopiaReplicationOperation} qui peut être
* rollbacker lorsque la replication a échouée.
*
*
* @author Tony Chemit - [email protected]
* @since 2.4.3
*/
public interface TopiaReplicationOperationUndoable extends TopiaReplicationOperation {
/**
* Execute l'operation inverse avec le parametrage donnee
* (pour annuler l'opération).
*
* Note : le commit sur le context cible doit etre geree dans la methode.
*
* @param operationDef la definition de l'operation a realiser
* @param replicationContext le context de replication
* @param dstCtxt le context destination
* @throws Exception pour toute erreur
*/
void rollback(ReplicationOperationDef operationDef,
TopiaReplicationContext replicationContext,
TopiaPersistenceContext dstCtxt
) throws Exception;
}