1 package org.apache.commons.jcs3.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.commons.jcs3.auxiliary.remote.behavior.ICommonRemoteCacheAttributes; 23 24 /** 25 * This defines the minimal behavior for the objects that are used to configure 26 * the remote cache server. 27 */ 28 public interface IRemoteCacheServerAttributes 29 extends ICommonRemoteCacheAttributes 30 { 31 /** 32 * Gets the localPort attribute of the IRemoteCacheAttributes object. 33 * <p> 34 * @return The localPort value 35 */ 36 int getServicePort(); 37 38 /** 39 * Sets the localPort attribute of the IRemoteCacheAttributes object. 40 * <p> 41 * @param p 42 * The new localPort value 43 */ 44 void setServicePort( int p ); 45 46 /** 47 * Should we try to get remotely when the request does not come in from a 48 * cluster. If local L1 asks remote server R1 for element A and R1 doesn't 49 * have it, should R1 look remotely? The difference is between a local and a 50 * remote update. The local update stays local. Normal updates, removes, 51 * etc, stay local when they come from a client. If this is set to true, 52 * then they can go remote. 53 * <p> 54 * @return The localClusterConsistency value 55 */ 56 boolean isAllowClusterGet(); 57 58 /** 59 * Should cluster updates be propagated to the locals. 60 * <p> 61 * @param r 62 * The new localClusterConsistency value 63 */ 64 void setAllowClusterGet( boolean r ); 65 66 /** 67 * Gets the ConfigFileName attribute of the IRemoteCacheAttributes object. 68 * <p> 69 * @return The configuration file name 70 */ 71 String getConfigFileName(); 72 73 /** 74 * Sets the ConfigFileName attribute of the IRemoteCacheAttributes object. 75 * <p> 76 * @param s 77 * The new configuration file name 78 */ 79 void setConfigFileName( String s ); 80 81 /** 82 * Should we try to keep the registry alive 83 * <p> 84 * @param useRegistryKeepAlive the useRegistryKeepAlive to set 85 */ 86 void setUseRegistryKeepAlive( boolean useRegistryKeepAlive ); 87 88 /** 89 * Should we start the registry 90 * <p> 91 * @param startRegistry the startRegistry to set 92 * @deprecated Always true, to be removed 93 */ 94 @Deprecated 95 void setStartRegistry( boolean startRegistry ); 96 97 /** 98 * Should we start the registry 99 * <p> 100 * @return the startRegistry 101 * @deprecated Always true, to be removed 102 */ 103 @Deprecated 104 boolean isStartRegistry(); 105 106 /** 107 * Should we try to keep the registry alive 108 * <p> 109 * @return the useRegistryKeepAlive 110 */ 111 boolean isUseRegistryKeepAlive(); 112 113 /** 114 * @param registryKeepAliveDelayMillis the registryKeepAliveDelayMillis to set 115 */ 116 void setRegistryKeepAliveDelayMillis( long registryKeepAliveDelayMillis ); 117 118 /** 119 * @return the registryKeepAliveDelayMillis 120 */ 121 long getRegistryKeepAliveDelayMillis(); 122 }