001    /*
002      Copyright (C) 2001 Renaud Pawlak
003    
004      This program is free software; you can redistribute it and/or modify
005      it under the terms of the GNU Lesser General Public License as
006      published by the Free Software Foundation; either version 2 of the
007      License, or (at your option) any later version.
008    
009      This program is distributed in the hope that it will be useful,
010      but WITHOUT ANY WARRANTY; without even the implied warranty of
011      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
012      GNU Lesser General Public License for more details.
013    
014      You should have received a copy of the GNU Lesser Generaly Public License
015      along with this program; if not, write to the Free Software
016      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
017    
018    package org.objectweb.jac.aspects.distribution;
019    
020    /**
021     * This aspect component provides some consistency protocols that can
022     * be settled on a set of replicas.
023     *
024     * @see ConsistencyAC
025     * @author Renaud Pawlak
026     */
027    
028    public interface ConsistencyConf {
029    
030       /**
031        * Adds a strong-push consistency protocol on a set of replicas
032        * called <code>wrappeeName</code>.
033        *
034        * <p>The classical use of this consistency protocol is that any
035        * replica forwards all the writing calls to all the replicas
036        * located on the hosts defined by the consistency.
037        *
038        * <p>It is called "push" since the replica pushes the data to the
039        * other replicas. Despite this strategy is the most curently used,
040        * other strong or weak consistency strategies can be implemented by
041        * other consistency protocols.
042        *
043        * @param wrappeeName the name of the object to be consistent
044        * @param methods a pointcut expression that defines the methods
045        * that will be pushed to the other replicas (generally the state
046        * modifiers -- use the MODIFIERS keyword in your expression)
047        * @param hosts the location of the replicas as a pointcut
048        * expression */
049    
050       void addStrongPushConsistency( String wrappeeName, String methods, String hosts );
051    
052       /**
053        * Adds a strong-pull consistency protocol on a set of replicas
054        * called <code>wrappeeName</code>.
055        *
056        * <p>On contrary to the push consistency, this protocol pulls the
057        * data from the other replicas. Indeed, each time a data is read
058        * and is not locally available, it is fetched from the known
059        * replicas.
060        *
061        * @param wrappeeName the name of the object to be consistent
062        * @param methods a pointcut expression that defines the methods
063        * that will be pulled from the other replicas (generally the state
064        * readers -- use the keyword ACCESSORS in your expression)
065        * @param hosts the location of the replicas as a pointcut
066        * expression */
067    
068       void addStrongPullConsistency( String wrappeeName, String methods, String hosts );
069    
070    }