You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-dev@jakarta.apache.org by tv...@apache.org on 2007/05/10 18:04:27 UTC
svn commit: r536904 [18/38] - in /jakarta/jcs/trunk: ./
auxiliary-builds/javagroups/
auxiliary-builds/javagroups/src/java/org/apache/jcs/auxiliary/javagroups/
auxiliary-builds/javagroups/src/test/org/apache/jcs/auxiliary/javagroups/
auxiliary-builds/jd...
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/TCPLateralCacheAttributes.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/TCPLateralCacheAttributes.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/TCPLateralCacheAttributes.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/TCPLateralCacheAttributes.java Thu May 10 09:03:42 2007
@@ -1,304 +1,308 @@
-package org.apache.jcs.auxiliary.lateral.socket.tcp;
-
-/*
- * Copyright 2001-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License")
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import org.apache.jcs.auxiliary.AuxiliaryCacheAttributes;
-import org.apache.jcs.auxiliary.lateral.LateralCacheAttributes;
-import org.apache.jcs.auxiliary.lateral.socket.tcp.behavior.ITCPLateralCacheAttributes;
-
-/**
- * This interface defines functions that are particular to the TCP Lateral Cache
- * plugin. It extends the generic LateralCacheAttributes interface which in turn
- * extends the AuxiliaryCache interface.
- *
- * @author Aaron Smuts
- *
- */
-public class TCPLateralCacheAttributes
- extends LateralCacheAttributes
- implements ITCPLateralCacheAttributes
-{
-
- private static final long serialVersionUID = 1077889204513905220L;
-
- private static final String DEFAULT_UDP_DISCOVERY_ADDRESS = "228.5.6.7";
-
- private static final int DEFAULT_UDP_DISCOVERY_PORT = 6789;
-
- private static final boolean DEFAULT_UDP_DISCOVERY_ENABLED = true;
-
- private static final boolean DEFAULT_ALLOW_GET = true;
-
- private static final boolean DEFAULT_ALLOW_PUT = true;
-
- private static final boolean DEFAULT_ISSUE_REMOVE_FOR_PUT = false;
-
- private static final boolean DEFAULT_FILTER_REMOVE_BY_HASH_CODE = true;
-
- // TCP --------------------------------------------
- private String tcpServers = "";
-
- // used to identify the service that this manager will be
- // operating on
- private String tcpServer = "";
-
- private int tcpListenerPort = 0;
-
- // udp discovery for tcp server
- private String udpDiscoveryAddr = DEFAULT_UDP_DISCOVERY_ADDRESS;
-
- private int udpDiscoveryPort = DEFAULT_UDP_DISCOVERY_PORT;
-
- private boolean udpDiscoveryEnabled = DEFAULT_UDP_DISCOVERY_ENABLED;
-
- private boolean allowPut = DEFAULT_ALLOW_GET;
-
- private boolean allowGet = DEFAULT_ALLOW_PUT;
-
- private boolean issueRemoveOnPut = DEFAULT_ISSUE_REMOVE_FOR_PUT;
-
- private boolean filterRemoveByHashCode = DEFAULT_FILTER_REMOVE_BY_HASH_CODE;
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#setTcpServer(java.lang.String)
- */
- public void setTcpServer( String val )
- {
- this.tcpServer = val;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#getTcpServer()
- */
- public String getTcpServer()
- {
- return this.tcpServer;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#setTcpServers(java.lang.String)
- */
- public void setTcpServers( String val )
- {
- this.tcpServers = val;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#getTcpServers()
- */
- public String getTcpServers()
- {
- return this.tcpServers;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#setTcpListenerPort(int)
- */
- public void setTcpListenerPort( int val )
- {
- this.tcpListenerPort = val;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#getTcpListenerPort()
- */
- public int getTcpListenerPort()
- {
- return this.tcpListenerPort;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#setUdpDiscoveryEnabled(boolean)
- */
- public void setUdpDiscoveryEnabled( boolean udpDiscoveryEnabled )
- {
- this.udpDiscoveryEnabled = udpDiscoveryEnabled;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#isUdpDiscoveryEnabled()
- */
- public boolean isUdpDiscoveryEnabled()
- {
- return this.udpDiscoveryEnabled;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#getUdpDiscoveryPort()
- */
- public int getUdpDiscoveryPort()
- {
- return this.udpDiscoveryPort;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#setUdpDiscoveryPort(int)
- */
- public void setUdpDiscoveryPort( int udpDiscoveryPort )
- {
- this.udpDiscoveryPort = udpDiscoveryPort;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#getUdpDiscoveryAddr()
- */
- public String getUdpDiscoveryAddr()
- {
- return this.udpDiscoveryAddr;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#setUdpDiscoveryAddr(java.lang.String)
- */
- public void setUdpDiscoveryAddr( String udpDiscoveryAddr )
- {
- this.udpDiscoveryAddr = udpDiscoveryAddr;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jcs.auxiliary.lateral.socket.tcp.behavior.ITCPLateralCacheAttributes#setAllowGet(boolean)
- */
- public void setAllowGet( boolean allowGet )
- {
- this.allowGet = allowGet;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jcs.auxiliary.lateral.socket.tcp.behavior.ITCPLateralCacheAttributes#isAllowGet()
- */
- public boolean isAllowGet()
- {
- return this.allowGet;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jcs.auxiliary.lateral.socket.tcp.behavior.ITCPLateralCacheAttributes#setAllowPut(boolean)
- */
- public void setAllowPut( boolean allowPut )
- {
- this.allowPut = allowPut;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jcs.auxiliary.lateral.socket.tcp.behavior.ITCPLateralCacheAttributes#isAllowPut()
- */
- public boolean isAllowPut()
- {
- return this.allowPut;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jcs.auxiliary.lateral.socket.tcp.behavior.ITCPLateralCacheAttributes#setIssueRemoveOnPut(boolean)
- */
- public void setIssueRemoveOnPut( boolean issueRemoveOnPut )
- {
- this.issueRemoveOnPut = issueRemoveOnPut;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jcs.auxiliary.lateral.socket.tcp.behavior.ITCPLateralCacheAttributes#isIssueRemoveOnPut()
- */
- public boolean isIssueRemoveOnPut()
- {
- return this.issueRemoveOnPut;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jcs.auxiliary.AuxiliaryCacheAttributes#copy()
- */
- public AuxiliaryCacheAttributes copy()
- {
- try
- {
- return (AuxiliaryCacheAttributes) this.clone();
- }
- catch ( Exception e )
- {
- //noop
- }
- return this;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jcs.auxiliary.lateral.socket.tcp.behavior.ITCPLateralCacheAttributes#isFilterRemoveByHashCode()
- */
- public boolean isFilterRemoveByHashCode()
- {
- return this.filterRemoveByHashCode;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jcs.auxiliary.lateral.socket.tcp.behavior.ITCPLateralCacheAttributes#setFilterRemoveByHashCode(boolean)
- */
- public void setFilterRemoveByHashCode( boolean filter )
- {
- this.filterRemoveByHashCode = filter;
- }
-
- /**
- * Used to key the instance TODO create another method for this and use
- * toString for debugging only.
- *
- * @return String
- */
- public String toString()
- {
- return this.getTcpServer() + ":" + this.getTcpListenerPort();
- }
-
-}
+package org.apache.jcs.auxiliary.lateral.socket.tcp;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.jcs.auxiliary.AuxiliaryCacheAttributes;
+import org.apache.jcs.auxiliary.lateral.LateralCacheAttributes;
+import org.apache.jcs.auxiliary.lateral.socket.tcp.behavior.ITCPLateralCacheAttributes;
+
+/**
+ * This interface defines functions that are particular to the TCP Lateral Cache
+ * plugin. It extends the generic LateralCacheAttributes interface which in turn
+ * extends the AuxiliaryCache interface.
+ *
+ * @author Aaron Smuts
+ *
+ */
+public class TCPLateralCacheAttributes
+ extends LateralCacheAttributes
+ implements ITCPLateralCacheAttributes
+{
+
+ private static final long serialVersionUID = 1077889204513905220L;
+
+ private static final String DEFAULT_UDP_DISCOVERY_ADDRESS = "228.5.6.7";
+
+ private static final int DEFAULT_UDP_DISCOVERY_PORT = 6789;
+
+ private static final boolean DEFAULT_UDP_DISCOVERY_ENABLED = true;
+
+ private static final boolean DEFAULT_ALLOW_GET = true;
+
+ private static final boolean DEFAULT_ALLOW_PUT = true;
+
+ private static final boolean DEFAULT_ISSUE_REMOVE_FOR_PUT = false;
+
+ private static final boolean DEFAULT_FILTER_REMOVE_BY_HASH_CODE = true;
+
+ // TCP --------------------------------------------
+ private String tcpServers = "";
+
+ // used to identify the service that this manager will be
+ // operating on
+ private String tcpServer = "";
+
+ private int tcpListenerPort = 0;
+
+ // udp discovery for tcp server
+ private String udpDiscoveryAddr = DEFAULT_UDP_DISCOVERY_ADDRESS;
+
+ private int udpDiscoveryPort = DEFAULT_UDP_DISCOVERY_PORT;
+
+ private boolean udpDiscoveryEnabled = DEFAULT_UDP_DISCOVERY_ENABLED;
+
+ private boolean allowPut = DEFAULT_ALLOW_GET;
+
+ private boolean allowGet = DEFAULT_ALLOW_PUT;
+
+ private boolean issueRemoveOnPut = DEFAULT_ISSUE_REMOVE_FOR_PUT;
+
+ private boolean filterRemoveByHashCode = DEFAULT_FILTER_REMOVE_BY_HASH_CODE;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#setTcpServer(java.lang.String)
+ */
+ public void setTcpServer( String val )
+ {
+ this.tcpServer = val;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#getTcpServer()
+ */
+ public String getTcpServer()
+ {
+ return this.tcpServer;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#setTcpServers(java.lang.String)
+ */
+ public void setTcpServers( String val )
+ {
+ this.tcpServers = val;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#getTcpServers()
+ */
+ public String getTcpServers()
+ {
+ return this.tcpServers;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#setTcpListenerPort(int)
+ */
+ public void setTcpListenerPort( int val )
+ {
+ this.tcpListenerPort = val;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#getTcpListenerPort()
+ */
+ public int getTcpListenerPort()
+ {
+ return this.tcpListenerPort;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#setUdpDiscoveryEnabled(boolean)
+ */
+ public void setUdpDiscoveryEnabled( boolean udpDiscoveryEnabled )
+ {
+ this.udpDiscoveryEnabled = udpDiscoveryEnabled;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#isUdpDiscoveryEnabled()
+ */
+ public boolean isUdpDiscoveryEnabled()
+ {
+ return this.udpDiscoveryEnabled;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#getUdpDiscoveryPort()
+ */
+ public int getUdpDiscoveryPort()
+ {
+ return this.udpDiscoveryPort;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#setUdpDiscoveryPort(int)
+ */
+ public void setUdpDiscoveryPort( int udpDiscoveryPort )
+ {
+ this.udpDiscoveryPort = udpDiscoveryPort;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#getUdpDiscoveryAddr()
+ */
+ public String getUdpDiscoveryAddr()
+ {
+ return this.udpDiscoveryAddr;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes#setUdpDiscoveryAddr(java.lang.String)
+ */
+ public void setUdpDiscoveryAddr( String udpDiscoveryAddr )
+ {
+ this.udpDiscoveryAddr = udpDiscoveryAddr;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jcs.auxiliary.lateral.socket.tcp.behavior.ITCPLateralCacheAttributes#setAllowGet(boolean)
+ */
+ public void setAllowGet( boolean allowGet )
+ {
+ this.allowGet = allowGet;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jcs.auxiliary.lateral.socket.tcp.behavior.ITCPLateralCacheAttributes#isAllowGet()
+ */
+ public boolean isAllowGet()
+ {
+ return this.allowGet;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jcs.auxiliary.lateral.socket.tcp.behavior.ITCPLateralCacheAttributes#setAllowPut(boolean)
+ */
+ public void setAllowPut( boolean allowPut )
+ {
+ this.allowPut = allowPut;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jcs.auxiliary.lateral.socket.tcp.behavior.ITCPLateralCacheAttributes#isAllowPut()
+ */
+ public boolean isAllowPut()
+ {
+ return this.allowPut;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jcs.auxiliary.lateral.socket.tcp.behavior.ITCPLateralCacheAttributes#setIssueRemoveOnPut(boolean)
+ */
+ public void setIssueRemoveOnPut( boolean issueRemoveOnPut )
+ {
+ this.issueRemoveOnPut = issueRemoveOnPut;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jcs.auxiliary.lateral.socket.tcp.behavior.ITCPLateralCacheAttributes#isIssueRemoveOnPut()
+ */
+ public boolean isIssueRemoveOnPut()
+ {
+ return this.issueRemoveOnPut;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jcs.auxiliary.AuxiliaryCacheAttributes#copy()
+ */
+ public AuxiliaryCacheAttributes copy()
+ {
+ try
+ {
+ return (AuxiliaryCacheAttributes) this.clone();
+ }
+ catch ( Exception e )
+ {
+ //noop
+ }
+ return this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jcs.auxiliary.lateral.socket.tcp.behavior.ITCPLateralCacheAttributes#isFilterRemoveByHashCode()
+ */
+ public boolean isFilterRemoveByHashCode()
+ {
+ return this.filterRemoveByHashCode;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jcs.auxiliary.lateral.socket.tcp.behavior.ITCPLateralCacheAttributes#setFilterRemoveByHashCode(boolean)
+ */
+ public void setFilterRemoveByHashCode( boolean filter )
+ {
+ this.filterRemoveByHashCode = filter;
+ }
+
+ /**
+ * Used to key the instance TODO create another method for this and use
+ * toString for debugging only.
+ *
+ * @return String
+ */
+ public String toString()
+ {
+ return this.getTcpServer() + ":" + this.getTcpListenerPort();
+ }
+
+}
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/behavior/ITCPLateralCacheAttributes.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/behavior/ITCPLateralCacheAttributes.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/behavior/ITCPLateralCacheAttributes.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/behavior/ITCPLateralCacheAttributes.java Thu May 10 09:03:42 2007
@@ -1,191 +1,199 @@
-package org.apache.jcs.auxiliary.lateral.socket.tcp.behavior;
-
-/*
- * Copyright 2001-2004 The Apache Software Foundation. Licensed under the Apache
- * License, Version 2.0 (the "License") you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
- * or agreed to in writing, software distributed under the License is
- * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-
-import org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes;
-
-/**
- * This interface defines functions that are particular to the TCP Lateral Cache
- * plugin. It extends the generic LateralCacheAttributes interface which in turn
- * extends the AuxiliaryCache interface.
- * <p>
- * @author Aaron Smuts
- */
-public interface ITCPLateralCacheAttributes
- extends ILateralCacheAttributes
-{
- /**
- * Sets the tcpServer attribute of the ILateralCacheAttributes object
- * <p>
- * @param val
- * The new tcpServer value
- */
- public void setTcpServer( String val );
-
- /**
- * Gets the tcpServer attribute of the ILateralCacheAttributes object
- * <p>
- * @return The tcpServer value
- */
- public String getTcpServer();
-
- /**
- * Sets the tcpServers attribute of the ILateralCacheAttributes object
- * <p>
- * @param val
- * The new tcpServers value
- */
- public void setTcpServers( String val );
-
- /**
- * Gets the tcpServers attribute of the ILateralCacheAttributes object
- * <p>
- * @return The tcpServers value
- */
- public String getTcpServers();
-
- /**
- * Sets the tcpListenerPort attribute of the ILateralCacheAttributes object
- * <p>
- * @param val
- * The new tcpListenerPort value
- */
- public void setTcpListenerPort( int val );
-
- /**
- * Gets the tcpListenerPort attribute of the ILateralCacheAttributes object
- * <p>
- * @return The tcpListenerPort value
- */
- public int getTcpListenerPort();
-
- /**
- * Can setup UDP Discovery. This only works for TCp laterals right now. It
- * allows TCP laterals to find each other by broadcasting to a multicast
- * port.
- * <p>
- * @param udpDiscoveryEnabled
- * The udpDiscoveryEnabled to set.
- */
- public void setUdpDiscoveryEnabled( boolean udpDiscoveryEnabled );
-
- /**
- * Whether or not TCP laterals can try to find each other by multicast
- * communication.
- * <p>
- * @return Returns the udpDiscoveryEnabled.
- */
- public boolean isUdpDiscoveryEnabled();
-
- /**
- * The port to use if UDPDiscovery is enabled.
- * <p>
- * @return Returns the udpDiscoveryPort.
- */
- public int getUdpDiscoveryPort();
-
- /**
- * Sets the port to use if UDPDiscovery is enabled.
- * <p>
- * @param udpDiscoveryPort
- * The udpDiscoveryPort to set.
- */
- public void setUdpDiscoveryPort( int udpDiscoveryPort );
-
- /**
- * The address to broadcast to if UDPDiscovery is enabled.
- * <p>
- * @return Returns the udpDiscoveryAddr.
- */
- public String getUdpDiscoveryAddr();
-
- /**
- * Sets the address to broadcast to if UDPDiscovery is enabled.
- * <p>
- * @param udpDiscoveryAddr
- * The udpDiscoveryAddr to set.
- */
- public void setUdpDiscoveryAddr( String udpDiscoveryAddr );
-
- /**
- * Is the lateral allowed to try and get from other laterals.
- * <p>
- * This replaces the old putOnlyMode
- * <p>
- * @param allowGet
- */
- public void setAllowGet( boolean allowGet );
-
- /**
- * Is the lateral allowed to try and get from other laterals.
- * <p>
- * @return true if the lateral will try to get
- */
- public boolean isAllowGet();
-
- /**
- * Is the lateral allowed to put objects to other laterals.
- * <p>
- * @param allowPut
- */
- public void setAllowPut( boolean allowPut );
-
- /**
- * Is the lateral allowed to put objects to other laterals.
- * <p>
- * @return true if puts are allowed
- */
- public boolean isAllowPut();
-
- /**
- * Should the client send a remove command rather than a put when update is
- * called. This is a client option, not a receiver option. This allows you
- * to prevent the lateral from serializing objects.
- * <p>
- * @param issueRemoveOnPut
- */
- public void setIssueRemoveOnPut( boolean issueRemoveOnPut );
-
- /**
- * Should the client send a remove command rather than a put when update is
- * called. This is a client option, not a receiver option. This allows you
- * to prevent the lateral from serializing objects.
- * <p>
- * @return true if updates will result in a remove command being sent.
- */
- public boolean isIssueRemoveOnPut();
-
- /**
- * Should the receiver try to match hashcodes. If true, the receiver will
- * see if the client supplied a hshcode. If it did, then it will try to get
- * the item locally. If the item exists, then it will compare the hashcode.
- * if they are the same, it will not remove. This isn't perfect since
- * different objects can have the same hashcode, but it is unlikely of
- * objects of the same type.
- * <p>
- * @return boolean
- */
- public boolean isFilterRemoveByHashCode();
-
- /**
- * Should the receiver try to match hashcodes. If true, the receiver will
- * see if the client supplied a hshcode. If it did, then it will try to get
- * the item locally. If the item exists, then it will compare the hashcode.
- * if they are the same, it will not remove. This isn't perfect since
- * different objects can have the same hashcode, but it is unlikely of
- * objects of the same type.
- * <p>
- * @param filter
- */
- public void setFilterRemoveByHashCode( boolean filter );
-
-}
+package org.apache.jcs.auxiliary.lateral.socket.tcp.behavior;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes;
+
+/**
+ * This interface defines functions that are particular to the TCP Lateral Cache
+ * plugin. It extends the generic LateralCacheAttributes interface which in turn
+ * extends the AuxiliaryCache interface.
+ * <p>
+ * @author Aaron Smuts
+ */
+public interface ITCPLateralCacheAttributes
+ extends ILateralCacheAttributes
+{
+ /**
+ * Sets the tcpServer attribute of the ILateralCacheAttributes object
+ * <p>
+ * @param val
+ * The new tcpServer value
+ */
+ public void setTcpServer( String val );
+
+ /**
+ * Gets the tcpServer attribute of the ILateralCacheAttributes object
+ * <p>
+ * @return The tcpServer value
+ */
+ public String getTcpServer();
+
+ /**
+ * Sets the tcpServers attribute of the ILateralCacheAttributes object
+ * <p>
+ * @param val
+ * The new tcpServers value
+ */
+ public void setTcpServers( String val );
+
+ /**
+ * Gets the tcpServers attribute of the ILateralCacheAttributes object
+ * <p>
+ * @return The tcpServers value
+ */
+ public String getTcpServers();
+
+ /**
+ * Sets the tcpListenerPort attribute of the ILateralCacheAttributes object
+ * <p>
+ * @param val
+ * The new tcpListenerPort value
+ */
+ public void setTcpListenerPort( int val );
+
+ /**
+ * Gets the tcpListenerPort attribute of the ILateralCacheAttributes object
+ * <p>
+ * @return The tcpListenerPort value
+ */
+ public int getTcpListenerPort();
+
+ /**
+ * Can setup UDP Discovery. This only works for TCp laterals right now. It
+ * allows TCP laterals to find each other by broadcasting to a multicast
+ * port.
+ * <p>
+ * @param udpDiscoveryEnabled
+ * The udpDiscoveryEnabled to set.
+ */
+ public void setUdpDiscoveryEnabled( boolean udpDiscoveryEnabled );
+
+ /**
+ * Whether or not TCP laterals can try to find each other by multicast
+ * communication.
+ * <p>
+ * @return Returns the udpDiscoveryEnabled.
+ */
+ public boolean isUdpDiscoveryEnabled();
+
+ /**
+ * The port to use if UDPDiscovery is enabled.
+ * <p>
+ * @return Returns the udpDiscoveryPort.
+ */
+ public int getUdpDiscoveryPort();
+
+ /**
+ * Sets the port to use if UDPDiscovery is enabled.
+ * <p>
+ * @param udpDiscoveryPort
+ * The udpDiscoveryPort to set.
+ */
+ public void setUdpDiscoveryPort( int udpDiscoveryPort );
+
+ /**
+ * The address to broadcast to if UDPDiscovery is enabled.
+ * <p>
+ * @return Returns the udpDiscoveryAddr.
+ */
+ public String getUdpDiscoveryAddr();
+
+ /**
+ * Sets the address to broadcast to if UDPDiscovery is enabled.
+ * <p>
+ * @param udpDiscoveryAddr
+ * The udpDiscoveryAddr to set.
+ */
+ public void setUdpDiscoveryAddr( String udpDiscoveryAddr );
+
+ /**
+ * Is the lateral allowed to try and get from other laterals.
+ * <p>
+ * This replaces the old putOnlyMode
+ * <p>
+ * @param allowGet
+ */
+ public void setAllowGet( boolean allowGet );
+
+ /**
+ * Is the lateral allowed to try and get from other laterals.
+ * <p>
+ * @return true if the lateral will try to get
+ */
+ public boolean isAllowGet();
+
+ /**
+ * Is the lateral allowed to put objects to other laterals.
+ * <p>
+ * @param allowPut
+ */
+ public void setAllowPut( boolean allowPut );
+
+ /**
+ * Is the lateral allowed to put objects to other laterals.
+ * <p>
+ * @return true if puts are allowed
+ */
+ public boolean isAllowPut();
+
+ /**
+ * Should the client send a remove command rather than a put when update is
+ * called. This is a client option, not a receiver option. This allows you
+ * to prevent the lateral from serializing objects.
+ * <p>
+ * @param issueRemoveOnPut
+ */
+ public void setIssueRemoveOnPut( boolean issueRemoveOnPut );
+
+ /**
+ * Should the client send a remove command rather than a put when update is
+ * called. This is a client option, not a receiver option. This allows you
+ * to prevent the lateral from serializing objects.
+ * <p>
+ * @return true if updates will result in a remove command being sent.
+ */
+ public boolean isIssueRemoveOnPut();
+
+ /**
+ * Should the receiver try to match hashcodes. If true, the receiver will
+ * see if the client supplied a hshcode. If it did, then it will try to get
+ * the item locally. If the item exists, then it will compare the hashcode.
+ * if they are the same, it will not remove. This isn't perfect since
+ * different objects can have the same hashcode, but it is unlikely of
+ * objects of the same type.
+ * <p>
+ * @return boolean
+ */
+ public boolean isFilterRemoveByHashCode();
+
+ /**
+ * Should the receiver try to match hashcodes. If true, the receiver will
+ * see if the client supplied a hshcode. If it did, then it will try to get
+ * the item locally. If the item exists, then it will compare the hashcode.
+ * if they are the same, it will not remove. This isn't perfect since
+ * different objects can have the same hashcode, but it is unlikely of
+ * objects of the same type.
+ * <p>
+ * @param filter
+ */
+ public void setFilterRemoveByHashCode( boolean filter );
+
+}
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoveryManager.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoveryManager.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoveryManager.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoveryManager.java Thu May 10 09:03:42 2007
@@ -1,5 +1,24 @@
package org.apache.jcs.auxiliary.lateral.socket.tcp.discovery;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import java.util.HashMap;
import java.util.Map;
@@ -12,9 +31,9 @@
* This manages UDPDiscovery Services. We should end up with one service per
* Lateral Cache Manager Instance. One service works for multiple regions. We
* don't want a connection for each region.
- *
+ *
* @author Aaron Smuts
- *
+ *
*/
public class UDPDiscoveryManager
{
@@ -31,7 +50,7 @@
/**
* Singelton
- *
+ *
* @return UDPDiscoveryManager
*/
public static UDPDiscoveryManager getInstance()
@@ -41,7 +60,7 @@
/**
* Returns the UDP Discovery service associated with this instance.
- *
+ *
* @param lca
* ITCPLateralCacheAttributes
* @param cacheMgr
@@ -50,7 +69,7 @@
public synchronized UDPDiscoveryService getService( ITCPLateralCacheAttributes lca, ICompositeCacheManager cacheMgr )
{
UDPDiscoveryService service = getService( lca.getUdpDiscoveryAddr(), lca.getUdpDiscoveryPort(), lca.getTcpListenerPort(), cacheMgr );
-
+
// TODO find a way to remote these attributes from the service, the manager needs it on disocvery.
service.setTcpLateralCacheAttributes( lca );
return service;
@@ -60,7 +79,7 @@
* Creates a service for the address and port if one doesn't exist already.
* <p>
* TODO we may need to key this using the listener port too
- *
+ *
* @param discoveryAddress
* @param discoveryPort
* @param servicePort
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoveryMessage.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoveryMessage.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoveryMessage.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoveryMessage.java Thu May 10 09:03:42 2007
@@ -1,13 +1,32 @@
package org.apache.jcs.auxiliary.lateral.socket.tcp.discovery;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
/**
- *
+ *
* @author Aaron Smuts
- *
+ *
*/
public class UDPDiscoveryMessage
implements Serializable
@@ -125,7 +144,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#toString()
*/
public String toString()
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoveryReceiver.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoveryReceiver.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoveryReceiver.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoveryReceiver.java Thu May 10 09:03:42 2007
@@ -1,19 +1,22 @@
package org.apache.jcs.auxiliary.lateral.socket.tcp.discovery;
/*
- * Copyright 2002-2004 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License")
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
import java.io.ByteArrayInputStream;
@@ -80,7 +83,7 @@
* Constructor for the LateralUDPReceiver object.
* <p>
* We determine out own host using InetAddress
- *
+ *
* @param service
* @param multicastAddressString
* @param multicastPort
@@ -103,7 +106,7 @@
pooledExecutor.setThreadFactory( new MyThreadFactory() );
if ( log.isInfoEnabled() )
- {
+ {
log.info( "constructing listener, [" + this.multicastAddressString + ":" + this.multicastPort + "]" );
}
@@ -121,7 +124,7 @@
/**
* Creates the socket for this class.
- *
+ *
* @param multicastAddressString
* @param multicastPort
* @throws IOException
@@ -144,7 +147,7 @@
/**
* Highly unreliable. If it is processing one message while another comes in ,
* the second message is lost. This is for low concurency peppering.
- *
+ *
* @return the object message
* @throws IOException
*/
@@ -269,7 +272,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Runnable#run()
*/
public void run()
@@ -352,7 +355,7 @@
{
log.error( "Problem creating no wait", e );
}
- }
+ }
// end while
}
else
@@ -370,16 +373,16 @@
/**
* Allows us to set the daemon status on the executor threads
- *
+ *
* @author aaronsm
- *
+ *
*/
class MyThreadFactory
implements ThreadFactory
{
/*
* (non-Javadoc)
- *
+ *
* @see EDU.oswego.cs.dl.util.concurrent.ThreadFactory#newThread(java.lang.Runnable)
*/
public Thread newThread( Runnable runner )
@@ -393,7 +396,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.jcs.engine.behavior.ShutdownObserver#shutdown()
*/
public void shutdown()
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoverySender.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoverySender.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoverySender.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoverySender.java Thu May 10 09:03:42 2007
@@ -1,19 +1,22 @@
package org.apache.jcs.auxiliary.lateral.socket.tcp.discovery;
/*
- * Copyright 2002-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License") you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
import java.io.ByteArrayOutputStream;
@@ -30,9 +33,9 @@
/**
* This is a generic sender for the UDPDiscovery process.
- *
+ *
* @author Aaron Smuts
- *
+ *
*/
public class UDPDiscoverySender
{
@@ -50,10 +53,10 @@
* This sender can be used to send multiple messages.
* <p>
* When you are done sending, you should destroy the socket sender.
- *
+ *
* @param host
* @param port
- *
+ *
* @exception IOException
*/
public UDPDiscoverySender( String host, int port )
@@ -78,7 +81,7 @@
/**
* Closes the socket connection.
- *
+ *
*/
public void destroy()
{
@@ -99,7 +102,7 @@
/**
* Just being careful about closing the socket.
- *
+ *
* @throws Throwable
*/
public void finalize()
@@ -111,7 +114,7 @@
/**
* Send messages.
- *
+ *
* @param message
* @throws IOException
*/
@@ -159,7 +162,7 @@
* Ask other to broadcast their info the the multicast address. If a lateral
* is non receiving it can use this. This is also called on startup so we
* can get info.
- *
+ *
* @throws IOException
*/
public void requestBroadcast()
@@ -181,7 +184,7 @@
* for connections.
* <p>
* It uses the vmid as the requesterDI
- *
+ *
* @param host
* @param port
* @param cacheNames
@@ -195,7 +198,7 @@
/**
* This allows you to set the sender id. This is mainly for testing.
- *
+ *
* @param host
* @param port
* @param cacheNames
@@ -222,7 +225,7 @@
/**
* This allows us to get the byte array from an output stream.
- *
+ *
* @author asmuts
* @created January 15, 2002
*/
@@ -232,7 +235,7 @@
{
/**
* Gets the bytes attribute of the MyByteArrayOutputStream object
- *
+ *
* @return The bytes value
*/
public byte[] getBytes()
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoverySenderThread.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoverySenderThread.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoverySenderThread.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoverySenderThread.java Thu May 10 09:03:42 2007
@@ -1,5 +1,24 @@
package org.apache.jcs.auxiliary.lateral.socket.tcp.discovery;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import java.util.ArrayList;
import org.apache.commons.logging.Log;
@@ -8,9 +27,9 @@
/**
* Used to periodically broadcast our location to other caches that might be
* listening.
- *
+ *
* @author Aaron Smuts
- *
+ *
*/
public class UDPDiscoverySenderThread
implements Runnable
@@ -55,7 +74,7 @@
* <p>
* On construction the sender will request that the other caches let it know
* their addresses.
- *
+ *
* @param discoveryAddress
* host to broadcast to
* @param discoveryPort
@@ -118,7 +137,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Runnable#run()
*/
public void run()
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoveryService.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoveryService.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoveryService.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/discovery/UDPDiscoveryService.java Thu May 10 09:03:42 2007
@@ -1,5 +1,24 @@
package org.apache.jcs.auxiliary.lateral.socket.tcp.discovery;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
@@ -21,7 +40,7 @@
import EDU.oswego.cs.dl.util.concurrent.ThreadFactory;
/**
- *
+ *
* This service creates a listener that can create lateral caches and add them
* to the no wait list.
* <p>
@@ -29,9 +48,9 @@
* <p>
* The sender also broadcasts a request for other caches to broadcast their
* addresses.
- *
+ *
* @author Aaron Smuts
- *
+ *
*/
public class UDPDiscoveryService
implements IShutdownObserver
@@ -65,7 +84,7 @@
private ITCPLateralCacheAttributes tcpLateralCacheAttributes;
/**
- *
+ *
* @param discoveryAddress
* address to multicast to
* @param discoveryPort
@@ -136,7 +155,7 @@
* When a broadcast is received from the UDP Discovery receiver, for each
* cacheName in the message, the add no wait will be called here. To add a
* no wait, the facade is looked up for this cache name.
- *
+ *
* @param facade
* @param cacheName
* @return true if the facade was not already registered.
@@ -164,7 +183,7 @@
* This adds nowaits to a facde for the region name. If the region has no
* facade, then it is not configured to use the lateral cache, and no facde
* will be created.
- *
+ *
* @param noWait
*/
protected void addNoWait( LateralCacheNoWait noWait )
@@ -198,7 +217,7 @@
* request for a request. We can respond to our own reques, since a request
* broadcast is not intended as a connection request. We might want to only
* send messages, so we would send a request, but never a passive broadcast.
- *
+ *
*/
protected void serviceRequestBroadcast()
{
@@ -242,7 +261,7 @@
/**
* Get all the cache names we have facades for.
- *
+ *
* @return
*/
protected ArrayList getCacheNames()
@@ -260,16 +279,16 @@
/**
* Allows us to set the daemon status on the clockdaemon
- *
+ *
* @author aaronsm
- *
+ *
*/
class MyThreadFactory
implements ThreadFactory
{
/*
* (non-Javadoc)
- *
+ *
* @see EDU.oswego.cs.dl.util.concurrent.ThreadFactory#newThread(java.lang.Runnable)
*/
public Thread newThread( Runnable runner )
@@ -283,7 +302,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.jcs.engine.behavior.ShutdownObserver#shutdown()
*/
public void shutdown()
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/utils/SocketOpener.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/utils/SocketOpener.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/utils/SocketOpener.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/utils/SocketOpener.java Thu May 10 09:03:42 2007
@@ -1,19 +1,22 @@
package org.apache.jcs.auxiliary.lateral.socket.tcp.utils;
/*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License")
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
import java.io.IOException;
@@ -22,7 +25,7 @@
/**
* Socket openere that will timeout on the initial connect rather than block
* forever. Technique from core java II.
- *
+ *
* @version $Id$
*/
public class SocketOpener
@@ -38,7 +41,7 @@
/**
* Opens a socket with a connection timeout value. Joins against a backgroud
* thread that does the openeing.
- *
+ *
* @param host
* @param port
* @param timeOut
@@ -62,7 +65,7 @@
/**
* Constructor for the SocketOpener object
- *
+ *
* @param host
* @param port
*/
@@ -87,7 +90,7 @@
}
/**
- *
+ *
* @return The opened socket
*/
public Socket getSocket()
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/package.html
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/package.html?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/package.html (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/package.html Thu May 10 09:03:42 2007
@@ -1,3 +1,21 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
<html>
<head>
</head>
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCache.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCache.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCache.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCache.java Thu May 10 09:03:42 2007
@@ -1,12 +1,22 @@
package org.apache.jcs.auxiliary.remote;
/*
- * Copyright 2001-2004 The Apache Software Foundation. Licensed under the Apache License, Version
- * 2.0 (the "License") you may not use this file except in compliance with the License. You may
- * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
- * applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See
- * the License for the specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
import java.io.IOException;
@@ -495,9 +505,9 @@
se = new StatElement();
se.setName( "Zombie Queue Size" );
se.setData( "" + ((ZombieRemoteCacheService)remote).getQueueSize() );
- elems.add( se );
+ elems.add( se );
}
-
+
// get an array and put them in the Stats object
IStatElement[] ses = (IStatElement[]) elems.toArray( new StatElement[0] );
stats.setStatElements( ses );
@@ -534,8 +544,8 @@
}
/**
- * Replaces the current remote cache service handle with the given handle.
- * If the current remote is a Zombie, the propagate teh events that may be
+ * Replaces the current remote cache service handle with the given handle.
+ * If the current remote is a Zombie, the propagate teh events that may be
* queued to the restored service.
* <p>
* @param remote IRemoteCacheService -- the remote server or proxy to the remote server
@@ -707,4 +717,4 @@
{
return "RemoteCache: " + cacheName + " attributes = " + irca;
}
-}
\ No newline at end of file
+}
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheAttributes.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheAttributes.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheAttributes.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheAttributes.java Thu May 10 09:03:42 2007
@@ -1,12 +1,22 @@
package org.apache.jcs.auxiliary.remote;
/*
- * Copyright 2001-2004 The Apache Software Foundation. Licensed under the Apache License, Version
- * 2.0 (the "License") you may not use this file except in compliance with the License. You may
- * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
- * applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See
- * the License for the specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
import org.apache.jcs.auxiliary.AbstractAuxiliaryCacheAttributes;
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheFactory.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheFactory.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheFactory.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheFactory.java Thu May 10 09:03:42 2007
@@ -1,12 +1,22 @@
package org.apache.jcs.auxiliary.remote;
/*
- * Copyright 2001-2004 The Apache Software Foundation. Licensed under the Apache License, Version
- * 2.0 (the "License") you may not use this file except in compliance with the License. You may
- * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
- * applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See
- * the License for the specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
import java.util.ArrayList;
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java Thu May 10 09:03:42 2007
@@ -1,19 +1,22 @@
package org.apache.jcs.auxiliary.remote;
/*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License")
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
import org.apache.commons.logging.Log;
@@ -39,7 +42,7 @@
* its connection to the primary server, it will attempt to restore that
* connectin in the background. If failovers are defined, the Failover runner
* will try to connect to a failover until the primary is restored.
- *
+ *
*/
public class RemoteCacheFailoverRunner
implements Runnable
@@ -57,7 +60,7 @@
/**
* Constructor for the RemoteCacheFailoverRunner object. This allows the
* FailoverRunner to modify the facade that the CompositeCache references.
- *
+ *
* @param facade
* the facade the CompositeCache talks to.
* @param cacheMgr
@@ -310,7 +313,7 @@
* <p>
* The primary server is the first server defines in the FailoverServers
* list.
- *
+ *
* @return boolean value indicating whether the resoration was successful
*/
private boolean restorePrimary()
@@ -416,7 +419,7 @@
// Restore primary
// may need to do this more gracefully, letting the failover finish in the background
RemoteCacheNoWait failoverNoWait = facade.noWaits[0];
-
+
// swap in a new one
facade.noWaits = new RemoteCacheNoWait[1];
facade.noWaits[0] = (RemoteCacheNoWait) ic;
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheListener.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheListener.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheListener.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheListener.java Thu May 10 09:03:42 2007
@@ -1,12 +1,22 @@
package org.apache.jcs.auxiliary.remote;
/*
- * Copyright 2001-2004 The Apache Software Foundation. Licensed under the Apache License, Version
- * 2.0 (the "License") you may not use this file except in compliance with the License. You may
- * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
- * applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See
- * the License for the specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
import java.io.IOException;
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheManager.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheManager.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheManager.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheManager.java Thu May 10 09:03:42 2007
@@ -1,12 +1,22 @@
package org.apache.jcs.auxiliary.remote;
/*
- * Copyright 2001-2004 The Apache Software Foundation. Licensed under the Apache License, Version
- * 2.0 (the "License") you may not use this file except in compliance with the License. You may
- * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
- * applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See
- * the License for the specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
import java.io.IOException;
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheMonitor.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheMonitor.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheMonitor.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheMonitor.java Thu May 10 09:03:42 2007
@@ -1,19 +1,22 @@
package org.apache.jcs.auxiliary.remote;
/*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License")
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
import java.util.Iterator;
@@ -31,7 +34,7 @@
* the monitor changes to operate in a time driven mode. That is, it attempts to
* recover the connections on a periodic basis. When all failed connections are
* restored, it changes back to the failure driven mode.
- *
+ *
*/
public class RemoteCacheMonitor
implements Runnable
@@ -63,7 +66,7 @@
/**
* Configures the idle period between repairs.
- *
+ *
* @param idlePeriod
* The new idlePeriod value
*/
@@ -83,7 +86,7 @@
/**
* Returns the singleton instance;
- *
+ *
* @return The instance value
*/
static RemoteCacheMonitor getInstance()
@@ -137,7 +140,7 @@
{
if ( log.isDebugEnabled() )
{
- log.debug( "FAILURE DRIVEN MODE: cache monitor waiting for error" );
+ log.debug( "FAILURE DRIVEN MODE: cache monitor waiting for error" );
}
wait();
// wake up only if there is an error.
@@ -152,7 +155,7 @@
else
{
if ( log.isDebugEnabled() )
- {
+ {
log.debug( "TIME DRIVEN MODE: cache monitor sleeping for " + idlePeriod );
}
// Time driven mode: sleep between each round of recovery
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheNoWait.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheNoWait.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheNoWait.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheNoWait.java Thu May 10 09:03:42 2007
@@ -1,12 +1,22 @@
package org.apache.jcs.auxiliary.remote;
/*
- * Copyright 2001-2004 The Apache Software Foundation. Licensed under the Apache License, Version
- * 2.0 (the "License") you may not use this file except in compliance with the License. You may
- * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
- * applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See
- * the License for the specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
import java.io.IOException;
@@ -67,7 +77,7 @@
private int removeCount = 0;
private int putCount = 0;
-
+
/**
* Constructs with the given remote cache, and fires up an event queue for aysnchronous
* processing.
@@ -325,7 +335,7 @@
{
return this.cacheEventQueue;
}
-
+
/**
* Returns the stats and the cache.toString().
* <p>
@@ -414,7 +424,7 @@
se.setName( "Put Count" );
se.setData( "" + this.putCount );
elems.add( se );
-
+
// get an array and put them in the Stats object
IStatElement[] ses = (IStatElement[]) elems.toArray( new StatElement[elems.size()] );
stats.setStatElements( ses );
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheNoWaitFacade.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheNoWaitFacade.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheNoWaitFacade.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheNoWaitFacade.java Thu May 10 09:03:42 2007
@@ -1,12 +1,22 @@
package org.apache.jcs.auxiliary.remote;
/*
- * Copyright 2001-2004 The Apache Software Foundation. Licensed under the Apache License, Version
- * 2.0 (the "License") you may not use this file except in compliance with the License. You may
- * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
- * applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See
- * the License for the specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
import java.io.IOException;
@@ -345,7 +355,7 @@
{
return this.remoteCacheAttributes;
}
-
+
/**
* getStats
* @return String
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheRestore.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheRestore.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheRestore.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheRestore.java Thu May 10 09:03:42 2007
@@ -1,12 +1,22 @@
package org.apache.jcs.auxiliary.remote;
/*
- * Copyright 2001-2004 The Apache Software Foundation. Licensed under the Apache License, Version
- * 2.0 (the "License") you may not use this file except in compliance with the License. You may
- * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
- * applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See
- * the License for the specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
import java.rmi.Naming;
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheWatchRepairable.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheWatchRepairable.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheWatchRepairable.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheWatchRepairable.java Thu May 10 09:03:42 2007
@@ -1,19 +1,22 @@
package org.apache.jcs.auxiliary.remote;
/*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License")
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
import org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheObserver;
@@ -22,7 +25,7 @@
/**
* Same as CacheWatcherWrapper but implements the IRemoteCacheWatch interface.
- *
+ *
*/
public class RemoteCacheWatchRepairable
extends CacheWatchRepairable
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteUtils.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteUtils.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteUtils.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/RemoteUtils.java Thu May 10 09:03:42 2007
@@ -1,19 +1,22 @@
package org.apache.jcs.auxiliary.remote;
/*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License")
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
import java.io.IOException;
@@ -57,13 +60,13 @@
log.info( "createRegistry> setting security manager" );
}
System.setSecurityManager( new RMISecurityManager() );
-
+
if ( port < 1024 )
{
if ( log.isInfoEnabled() )
{
log.info( "Port chosen was less than 1024, will use default [" + Registry.REGISTRY_PORT + "] instead." );
- }
+ }
port = Registry.REGISTRY_PORT;
}
Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/ZombieRemoteCacheService.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/ZombieRemoteCacheService.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/ZombieRemoteCacheService.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/ZombieRemoteCacheService.java Thu May 10 09:03:42 2007
@@ -1,12 +1,22 @@
package org.apache.jcs.auxiliary.remote;
/*
- * Copyright 2002-2004 The Apache Software Foundation. Licensed under the Apache License, Version
- * 2.0 (the "License") you may not use this file except in compliance with the License. You may
- * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
- * applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See
- * the License for the specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
import java.io.IOException;
---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org