KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jac > aspects > distribution > ConsistencyConf


1 /*
2   Copyright (C) 2001 Renaud Pawlak
3
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU Lesser General Public License as
6   published by the Free Software Foundation; either version 2 of the
7   License, or (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   GNU Lesser General Public License for more details.
13
14   You should have received a copy of the GNU Lesser Generaly Public License
15   along with this program; if not, write to the Free Software
16   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */

17
18 package org.objectweb.jac.aspects.distribution;
19
20 /**
21  * This aspect component provides some consistency protocols that can
22  * be settled on a set of replicas.
23  *
24  * @see ConsistencyAC
25  * @author Renaud Pawlak
26  */

27
28 public interface ConsistencyConf {
29
30    /**
31     * Adds a strong-push consistency protocol on a set of replicas
32     * called <code>wrappeeName</code>.
33     *
34     * <p>The classical use of this consistency protocol is that any
35     * replica forwards all the writing calls to all the replicas
36     * located on the hosts defined by the consistency.
37     *
38     * <p>It is called "push" since the replica pushes the data to the
39     * other replicas. Despite this strategy is the most curently used,
40     * other strong or weak consistency strategies can be implemented by
41     * other consistency protocols.
42     *
43     * @param wrappeeName the name of the object to be consistent
44     * @param methods a pointcut expression that defines the methods
45     * that will be pushed to the other replicas (generally the state
46     * modifiers -- use the MODIFIERS keyword in your expression)
47     * @param hosts the location of the replicas as a pointcut
48     * expression */

49
50    void addStrongPushConsistency( String JavaDoc wrappeeName, String JavaDoc methods, String JavaDoc hosts );
51
52    /**
53     * Adds a strong-pull consistency protocol on a set of replicas
54     * called <code>wrappeeName</code>.
55     *
56     * <p>On contrary to the push consistency, this protocol pulls the
57     * data from the other replicas. Indeed, each time a data is read
58     * and is not locally available, it is fetched from the known
59     * replicas.
60     *
61     * @param wrappeeName the name of the object to be consistent
62     * @param methods a pointcut expression that defines the methods
63     * that will be pulled from the other replicas (generally the state
64     * readers -- use the keyword ACCESSORS in your expression)
65     * @param hosts the location of the replicas as a pointcut
66     * expression */

67
68    void addStrongPullConsistency( String JavaDoc wrappeeName, String JavaDoc methods, String JavaDoc hosts );
69
70 }
71
Popular Tags