001package org.apache.commons.jcs.auxiliary.remote.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.jcs.auxiliary.AuxiliaryCacheAttributes; 023import org.apache.commons.jcs.auxiliary.remote.RemoteLocation; 024import org.apache.commons.jcs.auxiliary.remote.server.behavior.RemoteType; 025 026/** 027 * This specifies what a remote cache configuration object should look like. 028 */ 029public interface ICommonRemoteCacheAttributes 030 extends AuxiliaryCacheAttributes 031{ 032 /** The default timeout for the custom RMI socket factory */ 033 int DEFAULT_RMI_SOCKET_FACTORY_TIMEOUT_MILLIS = 10000; 034 035 /** 036 * Gets the remoteTypeName attribute of the IRemoteCacheAttributes object 037 * <p> 038 * @return The remoteTypeName value 039 */ 040 String getRemoteTypeName(); 041 042 /** 043 * Sets the remoteTypeName attribute of the IRemoteCacheAttributes object 044 * <p> 045 * @param s The new remoteTypeName value 046 */ 047 void setRemoteTypeName( String s ); 048 049 /** 050 * Gets the remoteType attribute of the IRemoteCacheAttributes object 051 * <p> 052 * @return The remoteType value 053 */ 054 RemoteType getRemoteType(); 055 056 /** 057 * Sets the remoteType attribute of the IRemoteCacheAttributes object 058 * <p> 059 * @param p The new remoteType value 060 */ 061 void setRemoteType( RemoteType p ); 062 063 /** 064 * Gets the remoteServiceName attribute of the IRemoteCacheAttributes object 065 * <p> 066 * @return The remoteServiceName value 067 */ 068 String getRemoteServiceName(); 069 070 /** 071 * Sets the remoteServiceName attribute of the IRemoteCacheAttributes object 072 * <p> 073 * @param s The new remoteServiceName value 074 */ 075 void setRemoteServiceName( String s ); 076 077 /** 078 * Sets the location attribute of the RemoteCacheAttributes object. 079 * <p> 080 * @param location The new location value 081 */ 082 void setRemoteLocation( RemoteLocation location ); 083 084 /** 085 * Sets the location attribute of the RemoteCacheAttributes object. 086 * <p> 087 * @param host The new remoteHost value 088 * @param port The new remotePort value 089 */ 090 void setRemoteLocation( String host, int port ); 091 092 /** 093 * Gets the location attribute of the RemoteCacheAttributes object. 094 * <p> 095 * @return The remote location value 096 */ 097 public RemoteLocation getRemoteLocation(); 098 099 /** 100 * Gets the clusterServers attribute of the IRemoteCacheAttributes object 101 * <p> 102 * @return The clusterServers value 103 */ 104 String getClusterServers(); 105 106 /** 107 * Sets the clusterServers attribute of the IRemoteCacheAttributes object 108 * <p> 109 * @param s The new clusterServers value 110 */ 111 void setClusterServers( String s ); 112 113 /** 114 * Gets the removeUponRemotePut attribute of the IRemoteCacheAttributes object 115 * <p> 116 * @return The removeUponRemotePut value 117 */ 118 boolean getRemoveUponRemotePut(); 119 120 /** 121 * Sets the removeUponRemotePut attribute of the IRemoteCacheAttributes object 122 * <p> 123 * @param r The new removeUponRemotePut value 124 */ 125 void setRemoveUponRemotePut( boolean r ); 126 127 /** 128 * Gets the getOnly attribute of the IRemoteCacheAttributes object 129 * <p> 130 * @return The getOnly value 131 */ 132 boolean getGetOnly(); 133 134 /** 135 * Sets the getOnly attribute of the IRemoteCacheAttributes object 136 * <p> 137 * @param r The new getOnly value 138 */ 139 void setGetOnly( boolean r ); 140 141 /** 142 * Should cluster updates be propagated to the locals 143 * <p> 144 * @return The localClusterConsistency value 145 */ 146 boolean isLocalClusterConsistency(); 147 148 /** 149 * Should cluster updates be propagated to the locals 150 * <p> 151 * @param r The new localClusterConsistency value 152 */ 153 void setLocalClusterConsistency( boolean r ); 154 155 /** 156 * This sets a general timeout on the rmi socket factory. By default the socket factory will 157 * block forever. 158 * <p> 159 * We have a default setting. The default rmi behavior should never be used. 160 * <p> 161 * @return int milliseconds 162 */ 163 int getRmiSocketFactoryTimeoutMillis(); 164 165 /** 166 * This sets a general timeout on the RMI socket factory. By default the socket factory will 167 * block forever. 168 * <p> 169 * @param rmiSocketFactoryTimeoutMillis 170 */ 171 void setRmiSocketFactoryTimeoutMillis( int rmiSocketFactoryTimeoutMillis ); 172}