View Javadoc

1   package org.apache.jcs.auxiliary.remote.server.behavior;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import org.apache.jcs.auxiliary.AuxiliaryCacheAttributes;
23  
24  /***
25   * This defeines the minimal behavior for the objects that are used to configure
26   * the remote cache server.
27   */
28  public interface IRemoteCacheServerAttributes
29      extends AuxiliaryCacheAttributes
30  {
31      /*** A remote cache is either a local cache or a cluster cache */
32      public static int LOCAL = 0;
33  
34      /*** A remote cache is either a local cache or a cluster cache */
35      public static int CLUSTER = 1;
36  
37      /***
38       * Gets the remoteTypeName attribute of the IRemoteCacheAttributes object.
39       * <p>
40       * @return The remoteTypeName value
41       */
42      public String getRemoteTypeName();
43  
44      /***
45       * Sets the remoteTypeName attribute of the IRemoteCacheAttributes object.
46       * <p>
47       * @param s
48       *            The new remoteTypeName value
49       */
50      public void setRemoteTypeName( String s );
51  
52      /***
53       * Gets the remoteType attribute of the IRemoteCacheAttributes object.
54       * <p>
55       * @return The remoteType value
56       */
57      public int getRemoteType();
58  
59      /***
60       * Sets the remoteType attribute of the IRemoteCacheAttributes object.
61       * <p>
62       * @param p
63       *            The new remoteType value
64       */
65      public void setRemoteType( int p );
66  
67      /***
68       * Gets the remoteHost attribute of the IRemoteCacheAttributes object.
69       * <p>
70       * @return The remoteHost value
71       */
72      public String getRemoteHost();
73  
74      /***
75       * Sets the remoteHost attribute of the IRemoteCacheAttributes object.
76       * <p>
77       * @param s
78       *            The new remoteHost value
79       */
80      public void setRemoteHost( String s );
81  
82      /***
83       * Gets the remotePort attribute of the IRemoteCacheAttributes object.
84       * <p>
85       * @return The remotePort value
86       */
87      public int getRemotePort();
88  
89      /***
90       * Sets the remotePort attribute of the IRemoteCacheAttributes object.
91       * <p>
92       * @param p
93       *            The new remotePort value
94       */
95      public void setRemotePort( int p );
96  
97      /***
98       * Gets the localPort attribute of the IRemoteCacheAttributes object.
99       * <p>
100      * @return The localPort value
101      */
102     public int getServicePort();
103 
104     /***
105      * Sets the localPort attribute of the IRemoteCacheAttributes object.
106      * <p>
107      * @param p
108      *            The new localPort value
109      */
110     public void setServicePort( int p );
111 
112     /***
113      * Gets the clusterServers attribute of the IRemoteCacheAttributes object.
114      * <p>
115      * @return The clusterServers value
116      */
117     public String getClusterServers();
118 
119     /***
120      * Sets the clusterServers attribute of the IRemoteCacheAttributes object.
121      * <p>
122      * @param s
123      *            The new clusterServers value
124      */
125     public void setClusterServers( String s );
126 
127     /***
128      * Gets the removeUponRemotePut attribute of the IRemoteCacheAttributes.
129      * object.
130      * <p>
131      * @return The removeUponRemotePut value
132      */
133     public boolean getRemoveUponRemotePut();
134 
135     /***
136      * Sets the removeUponRemotePut attribute of the IRemoteCacheAttributes.
137      * object
138      * <p>
139      * @param r
140      *            The new removeUponRemotePut value
141      */
142     public void setRemoveUponRemotePut( boolean r );
143 
144     /***
145      * Gets the getOnly attribute of the IRemoteCacheAttributes object.
146      * A remote cache is either a local cache or a cluster cache
147      * @return The getOnly value
148      */
149     public boolean getGetOnly();
150 
151     /***
152      * Sets the getOnly attribute of the IRemoteCacheAttributes object.
153      * <p>
154      * @param r
155      *            The new getOnly value
156      */
157     public void setGetOnly( boolean r );
158 
159     /***
160      * Should cluster updates be propogated to the locals.
161      * <p>
162      * @return The localClusterConsistency value
163      */
164     public boolean getLocalClusterConsistency();
165 
166     /***
167      * Should cluster updates be propogated to the locals.
168      * <p>
169      * @param r
170      *            The new localClusterConsistency value
171      */
172     public void setLocalClusterConsistency( boolean r );
173 
174     /***
175      * Should we try to get remotely when the request does not come in from a
176      * cluster. If local L1 asks remote server R1 for element A and R1 doesn't
177      * have it, should R1 look remotely? The difference is between a local and a
178      * remote update. The local update stays local. Normal updates, removes,
179      * etc, stay local when they come from a client. If this is set to true,
180      * then they can go remote.
181      * <p>
182      * @return The localClusterConsistency value
183      */
184     public boolean getAllowClusterGet();
185 
186     /***
187      * Should cluster updates be propogated to the locals.
188      * <p>
189      * @param r
190      *            The new localClusterConsistency value
191      */
192     public void setAllowClusterGet( boolean r );
193 
194     /***
195      * Gets the ConfigFileName attribute of the IRemoteCacheAttributes object.
196      * <p>
197      * @return The clusterServers value
198      */
199     public String getConfigFileName();
200 
201     /***
202      * Sets the ConfigFileName attribute of the IRemoteCacheAttributes object.
203      * <p>
204      * @param s
205      *            The new clusterServers value
206      */
207     public void setConfigFileName( String s );
208 }