/* * JBoss, Home of Professional Open Source. * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.cache.jmx; import org.jboss.cache.Region; import org.jgroups.ChannelFactory; import org.jgroups.jmx.JChannelFactoryMBean; import org.w3c.dom.Element; import javax.transaction.TransactionManager; /** * Legacy configuration attributes from JBC 1.x. * * @author Brian Stansberry * @version $Revision$ * @deprecated use {@link org.jboss.cache.jmx.JmxRegistrationManager} */ @Deprecated public interface LegacyConfiguration { /** * Get the name of the replication group */ String getClusterName(); /** * Set the name of the replication group */ void setClusterName(String name); /** * Sets whether marshalling uses scoped class loaders on a per region basis. *

* This property must be set to true before any call to * {@link Region#registerContextClassLoader(ClassLoader)}. * * @param isTrue */ void setUseRegionBasedMarshalling(boolean isTrue); /** * Gets whether marshalling uses scoped class loaders on a per region basis. * * @return true if region based marshalling is used. */ boolean getUseRegionBasedMarshalling(); /** * Gets whether the cache should create interceptor mbeans * that are used to capture and publish interceptor statistics. * * @return true if mbeans should be created for each interceptor */ boolean getExposeManagementStatistics(); void setExposeManagementStatistics(boolean expose); /** * @deprecated use {@link #getExposeManagementStatistics()} */ @Deprecated boolean getUseInterceptorMbeans(); /** * @deprecated use {@link #setExposeManagementStatistics(boolean)} */ @Deprecated void setUseInterceptorMbeans(boolean expose); /** * Get the cluster properties (e.g. the protocol stack specification in case of JGroups) */ String getClusterProperties(); /** * Set the cluster properties. If the cache is to use the new properties, it has to be redeployed * * @param cluster_props The properties for the cluster (JGroups) */ void setClusterProperties(String cluster_props); /** * Retrieves the cache loader configuration element * * @return whatever was passed to {@link #setCacheLoaderConfig(Element)} * or null if nothing was */ Element getCacheLoaderConfig(); void setCacheLoaderConfig(Element cacheLoaderConfig); /** * @deprecated use {@link #getCacheLoaderConfig()} */ @Deprecated Element getCacheLoaderConfiguration(); /** * @deprecated use {@link #setCacheLoaderConfig(org.w3c.dom.Element)} */ @Deprecated void setCacheLoaderConfiguration(Element cache_loader_config); boolean getSyncCommitPhase(); void setSyncCommitPhase(boolean sync_commit_phase); boolean getSyncRollbackPhase(); void setSyncRollbackPhase(boolean sync_rollback_phase); /** * @return whatever was passed to {@link #setEvictionPolicyConfig(Element)} * or null if nothing was */ Element getEvictionPolicyConfig(); /** * Setup eviction policy configuration */ void setEvictionPolicyConfig(Element config); /** * Gets the JGroups protocol stack config in W3C DOM Element form. * * @return the protocol stack, or null if it was not * set via {@link #setClusterConfig(Element)} */ Element getClusterConfig(); /** * Convert a list of elements to the JG property string */ void setClusterConfig(Element config); /** * Get the max time to wait until the initial state is retrieved. This is used in a replicating cache: when a new cache joins the cluster, it needs to acquire the (replicated) state of the other members to initialize itself. If no state has been received within timeout milliseconds, the map will be empty. * * @return long Number of milliseconds to wait for the state. 0 means to wait forever. * @deprecated use {@link #getStateRetrievalTimeout()} */ @Deprecated long getInitialStateRetrievalTimeout(); /** * Get the max time to wait until the state is retrieved. This is used in a replicating cache: when a new cache joins the cluster, it needs to acquire the (replicated) state of the other members to initialize itself. If no state has been received within timeout milliseconds, the map will be empty. * * @return long Number of milliseconds to wait for the state. 0 means to wait forever. */ long getStateRetrievalTimeout(); /** * Set the initial state transfer timeout (see {@link #getInitialStateRetrievalTimeout()}) * * @deprecated use {@link #setStateRetrievalTimeout(long)} */ @Deprecated void setInitialStateRetrievalTimeout(long timeout); /** * Set the state transfer timeout (see {@link #getStateRetrievalTimeout()}) */ void setStateRetrievalTimeout(long timeout); /** * Returns the current caching mode. Valid values are