001package org.apache.commons.jcs3.auxiliary.remote.server.behavior; 002 003/* 004 * Licensed to the Apache Software Foundation (ASF) under one 005 * or more contributor license agreements. See the NOTICE file 006 * distributed with this work for additional information 007 * regarding copyright ownership. The ASF licenses this file 008 * to you under the Apache License, Version 2.0 (the 009 * "License"); you may not use this file except in compliance 010 * with the License. You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, 015 * software distributed under the License is distributed on an 016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 017 * KIND, either express or implied. See the License for the 018 * specific language governing permissions and limitations 019 * under the License. 020 */ 021 022import org.apache.commons.jcs3.auxiliary.remote.behavior.ICommonRemoteCacheAttributes; 023 024/** 025 * This defines the minimal behavior for the objects that are used to configure 026 * the remote cache server. 027 */ 028public interface IRemoteCacheServerAttributes 029 extends ICommonRemoteCacheAttributes 030{ 031 /** 032 * Gets the localPort attribute of the IRemoteCacheAttributes object. 033 * <p> 034 * @return The localPort value 035 */ 036 int getServicePort(); 037 038 /** 039 * Sets the localPort attribute of the IRemoteCacheAttributes object. 040 * <p> 041 * @param p 042 * The new localPort value 043 */ 044 void setServicePort( int p ); 045 046 /** 047 * Should we try to get remotely when the request does not come in from a 048 * cluster. If local L1 asks remote server R1 for element A and R1 doesn't 049 * have it, should R1 look remotely? The difference is between a local and a 050 * remote update. The local update stays local. Normal updates, removes, 051 * etc, stay local when they come from a client. If this is set to true, 052 * then they can go remote. 053 * <p> 054 * @return The localClusterConsistency value 055 */ 056 boolean isAllowClusterGet(); 057 058 /** 059 * Should cluster updates be propagated to the locals. 060 * <p> 061 * @param r 062 * The new localClusterConsistency value 063 */ 064 void setAllowClusterGet( boolean r ); 065 066 /** 067 * Gets the ConfigFileName attribute of the IRemoteCacheAttributes object. 068 * <p> 069 * @return The configuration file name 070 */ 071 String getConfigFileName(); 072 073 /** 074 * Sets the ConfigFileName attribute of the IRemoteCacheAttributes object. 075 * <p> 076 * @param s 077 * The new configuration file name 078 */ 079 void setConfigFileName( String s ); 080 081 /** 082 * Should we try to keep the registry alive 083 * <p> 084 * @param useRegistryKeepAlive the useRegistryKeepAlive to set 085 */ 086 void setUseRegistryKeepAlive( boolean useRegistryKeepAlive ); 087 088 /** 089 * Should we start the registry 090 * <p> 091 * @param startRegistry the startRegistry to set 092 * @deprecated Always true, to be removed 093 */ 094 @Deprecated 095 void setStartRegistry( boolean startRegistry ); 096 097 /** 098 * Should we start the registry 099 * <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}