1 package org.apache.jcs.auxiliary.lateral.behavior;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.Serializable;
23
24 import org.apache.jcs.auxiliary.AuxiliaryCacheAttributes;
25
26 /***
27 * This interface defines configuration options common to lateral cache
28 * plugins.
29 * <p>
30 * TODO it needs to be trimmed down. The old version had features for
31 * every lateral. Now, the individual laterals have their own specific
32 * attributes interfaces.
33 *
34 */
35 public interface ILateralCacheAttributes
36 extends Serializable, AuxiliaryCacheAttributes
37 {
38
39 /***
40 * HTTP type
41 */
42 final static int HTTP = 1;
43
44 /***
45 * UDP type
46 */
47 final static int UDP = 2;
48
49 /***
50 * TCP type
51 */
52 final static int TCP = 3;
53
54 /***
55 * XMLRPC type
56 */
57 final static int XMLRPC = 4;
58
59 /***
60 * JGROUPS type
61 */
62 final static int JAVAGROUPS = 5;
63
64 /***
65 * Sets the httpServer attribute of the ILateralCacheAttributes object
66 * <p>
67 * @param val
68 * The new httpServer value
69 */
70 public void setHttpServer( String val );
71
72 /***
73 * Gets the httpServer attribute of the ILateralCacheAttributes object
74 * <p>
75 * @return The httpServer value
76 */
77 public String getHttpServer();
78
79
80 /***
81 * Sets the httpListenerPort attribute of the ILateralCacheAttributes object
82 * <p>
83 * @param val
84 * The new tcpListenerPort value
85 */
86 public void setHttpListenerPort( int val );
87
88 /***
89 * Gets the httpListenerPort attribute of the ILateralCacheAttributes object
90 * <p>
91 * @return The httpListenerPort value
92 */
93 public int getHttpListenerPort();
94
95 /***
96 * Sets the httpServers attribute of the LateralCacheAttributes object
97 * <p>
98 * @param val
99 * The new httpServers value
100 */
101 public void setHttpServers( String val );
102
103 /***
104 * Gets the httpSrvers attribute of the LateralCacheAttributes object
105 * <p>
106 * @return The httpServers value
107 */
108 public String getHttpServers();
109
110 /***
111 * Sets the udpMulticastAddr attribute of the ILateralCacheAttributes object
112 * <p>
113 * @param val
114 * The new udpMulticastAddr value
115 */
116 public void setUdpMulticastAddr( String val );
117
118 /***
119 * Gets the udpMulticastAddr attribute of the ILateralCacheAttributes object
120 * <p>
121 * @return The udpMulticastAddr value
122 */
123 public String getUdpMulticastAddr();
124
125 /***
126 * Sets the udpMulticastPort attribute of the ILateralCacheAttributes object
127 * <p>
128 * @param val
129 * The new udpMulticastPort value
130 */
131 public void setUdpMulticastPort( int val );
132
133 /***
134 * Gets the udpMulticastPort attribute of the ILateralCacheAttributes object
135 * <p>
136 * @return The udpMulticastPort value
137 */
138 public int getUdpMulticastPort();
139
140 /***
141 * Sets the transmissionType attribute of the ILateralCacheAttributes object
142 * <p>
143 * @param val
144 * The new transmissionType value
145 */
146 public void setTransmissionType( int val );
147
148 /***
149 * Gets the transmissionType attribute of the ILateralCacheAttributes object
150 * <p>
151 * @return The transmissionType value
152 */
153 public int getTransmissionType();
154
155 /***
156 * Sets the transmissionTypeName attribute of the ILateralCacheAttributes
157 * object
158 * <p>
159 * @param val
160 * The new transmissionTypeName value
161 */
162 public void setTransmissionTypeName( String val );
163
164 /***
165 * Gets the transmissionTypeName attribute of the ILateralCacheAttributes
166 * object
167 * <p>
168 * @return The transmissionTypeName value
169 */
170 public String getTransmissionTypeName();
171
172 /***
173 * Sets the putOnlyMode attribute of the ILateralCacheAttributes. When this
174 * is true the lateral cache will only issue put and remove order and will
175 * not try to retrieve elements from other lateral caches.
176 * <p>
177 * @param val
178 * The new transmissionTypeName value
179 */
180 public void setPutOnlyMode( boolean val );
181
182 /***
183 * @return The outgoingOnlyMode value. Stops gets from going remote.
184 */
185 public boolean getPutOnlyMode();
186
187 /***
188 *
189 * @return String The Javagroups channel propeties.
190 */
191 public String getJGChannelProperties();
192
193 /***
194 *
195 * Sets the Javagroups channel propeties.
196 *
197 * @param channelProperties
198 * String
199 */
200 public void setJGChannelProperties( String channelProperties );
201
202 /***
203 * @param receive
204 * The receive to set.
205 */
206 public void setReceive( boolean receive );
207
208 /***
209 * Should a listener be created. By default this is true.
210 * <p>
211 * If this is false the lateral will connect to others but it will not
212 * create a listener to receive.
213 * <p>
214 * It is possible if two laterals are misconfigured that lateral A may have
215 * a region R1 that is not configured for the lateral but another is. And if
216 * cache B has region R1 configured for lateral distribution, A will get
217 * messages for R1 but not send them.
218 *
219 * @return true if we should have a listener conenction
220 */
221 public boolean isReceive();
222
223
224 }