Clover coverage report -
Coverage timestamp: Thu Jul 5 2007 20:02:32 EDT
file stats: LOC: 363   Methods: 0
NCLOC: 74   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
LegacyConfiguration.java - - - -
coverage
 1    /*
 2    * JBoss, Home of Professional Open Source.
 3    * Copyright 2007, Red Hat Middleware LLC, and individual contributors
 4    * as indicated by the @author tags. See the copyright.txt file in the
 5    * distribution for a full listing of individual contributors.
 6    *
 7    * This is free software; you can redistribute it and/or modify it
 8    * under the terms of the GNU Lesser General Public License as
 9    * published by the Free Software Foundation; either version 2.1 of
 10    * the License, or (at your option) any later version.
 11    *
 12    * This software is distributed in the hope that it will be useful,
 13    * but WITHOUT ANY WARRANTY; without even the implied warranty of
 14    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 15    * Lesser General Public License for more details.
 16    *
 17    * You should have received a copy of the GNU Lesser General Public
 18    * License along with this software; if not, write to the Free
 19    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 20    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 21    */
 22    package org.jboss.cache.jmx;
 23   
 24    import org.jboss.cache.Region;
 25    import org.jgroups.ChannelFactory;
 26    import org.jgroups.jmx.JChannelFactoryMBean;
 27    import org.w3c.dom.Element;
 28   
 29    import javax.transaction.TransactionManager;
 30   
 31    /**
 32    * Legacy configuration attributes from JBC 1.x.
 33    *
 34    * @author <a href="brian.stansberry@jboss.com">Brian Stansberry</a>
 35    * @version $Revision: 1.7 $
 36    */
 37    public interface LegacyConfiguration
 38    {
 39    /**
 40    * Get the name of the replication group
 41    */
 42    String getClusterName();
 43   
 44    /**
 45    * Set the name of the replication group
 46    */
 47    void setClusterName(String name);
 48   
 49    /**
 50    * Sets whether marshalling uses scoped class loaders on a per region basis.
 51    * <p/>
 52    * This property must be set to <code>true</code> before any call to
 53    * {@link Region#registerContextClassLoader(ClassLoader)}.
 54    *
 55    * @param isTrue
 56    */
 57    void setUseRegionBasedMarshalling(boolean isTrue);
 58   
 59    /**
 60    * Gets whether marshalling uses scoped class loaders on a per region basis.
 61    *
 62    * @return true if region based marshalling is used.
 63    */
 64    boolean getUseRegionBasedMarshalling();
 65   
 66    /**
 67    * Gets whether the cache should create interceptor mbeans
 68    * that are used to capture and publish interceptor statistics.
 69    *
 70    * @return true if mbeans should be created for each interceptor
 71    */
 72    boolean getExposeManagementStatistics();
 73   
 74    void setExposeManagementStatistics(boolean expose);
 75   
 76    /**
 77    * @deprecated use {@link #getExposeManagementStatistics()}
 78    */
 79    @Deprecated
 80    boolean getUseInterceptorMbeans();
 81   
 82    /**
 83    * @deprecated use {@link #setExposeManagementStatistics(boolean)}
 84    */
 85    @Deprecated
 86    void setUseInterceptorMbeans(boolean expose);
 87   
 88    /**
 89    * Get the cluster properties (e.g. the protocol stack specification in case of JGroups)
 90    */
 91    String getClusterProperties();
 92   
 93    /**
 94    * Set the cluster properties. If the cache is to use the new properties, it has to be redeployed
 95    *
 96    * @param cluster_props The properties for the cluster (JGroups)
 97    */
 98    void setClusterProperties(String cluster_props);
 99   
 100    /**
 101    * Retrieves the cache loader configuration element
 102    *
 103    * @return whatever was passed to {@link #setCacheLoaderConfig(Element)}
 104    * or <code>null</code> if nothing was
 105    */
 106    Element getCacheLoaderConfig();
 107   
 108    void setCacheLoaderConfig(Element cache_loader_config);
 109   
 110    /**
 111    * @deprecated use {@link #getCacheLoaderConfig()}
 112    */
 113    @Deprecated
 114    Element getCacheLoaderConfiguration();
 115   
 116    /**
 117    * @deprecated use {@link #setCacheLoaderConfig(org.w3c.dom.Element)}
 118    */
 119    @Deprecated
 120    void setCacheLoaderConfiguration(Element cache_loader_config);
 121   
 122    boolean getSyncCommitPhase();
 123   
 124    void setSyncCommitPhase(boolean sync_commit_phase);
 125   
 126    boolean getSyncRollbackPhase();
 127   
 128    void setSyncRollbackPhase(boolean sync_rollback_phase);
 129   
 130    /**
 131    * @return whatever was passed to {@link #setEvictionPolicyConfig(Element)}
 132    * or <code>null</code> if nothing was
 133    */
 134    Element getEvictionPolicyConfig();
 135   
 136    /**
 137    * Setup eviction policy configuration
 138    */
 139    void setEvictionPolicyConfig(Element config);
 140   
 141    /**
 142    * Gets the JGroups protocol stack config in W3C DOM Element form.
 143    *
 144    * @return the protocol stack, or <code>null</code> if it was not
 145    * set via {@link #setClusterConfig(Element)}
 146    */
 147    Element getClusterConfig();
 148   
 149    /**
 150    * Convert a list of elements to the JG property string
 151    */
 152    void setClusterConfig(Element config);
 153   
 154    /**
 155    * 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 <tt>timeout</tt> milliseconds, the map will be empty.
 156    *
 157    * @return long Number of milliseconds to wait for the state. 0 means to wait forever.
 158    * @deprecated use {@link #getStateRetrievalTimeout()}
 159    */
 160    @Deprecated
 161    long getInitialStateRetrievalTimeout();
 162   
 163    /**
 164    * 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 <tt>timeout</tt> milliseconds, the map will be empty.
 165    *
 166    * @return long Number of milliseconds to wait for the state. 0 means to wait forever.
 167    */
 168    long getStateRetrievalTimeout();
 169   
 170    /**
 171    * Set the initial state transfer timeout (see {@link #getInitialStateRetrievalTimeout()})
 172    *
 173    * @deprecated use {@link #setStateRetrievalTimeout(long)}
 174    */
 175    @Deprecated
 176    void setInitialStateRetrievalTimeout(long timeout);
 177   
 178    /**
 179    * Set the state transfer timeout (see {@link #getStateRetrievalTimeout()})
 180    */
 181    void setStateRetrievalTimeout(long timeout);
 182   
 183    /**
 184    * Returns the current caching mode. Valid values are <ul> <li>LOCAL <li>REPL_ASYNC <li>REPL_SYNC <ul>
 185    *
 186    * @return String The caching mode
 187    */
 188    String getCacheMode();
 189   
 190    /**
 191    * Sets the default caching mode)
 192    */
 193    void setCacheMode(String mode) throws Exception;
 194   
 195    /**
 196    * Returns the default max timeout after which synchronous replication calls return.
 197    *
 198    * @return long Number of milliseconds after which a sync repl call must return. 0 means to wait forever
 199    */
 200    long getSyncReplTimeout();
 201   
 202    /**
 203    * Sets the default maximum wait time for synchronous replication to receive all results
 204    */
 205    void setSyncReplTimeout(long timeout);
 206   
 207    boolean getUseReplQueue();
 208   
 209    void setUseReplQueue(boolean flag);
 210   
 211    long getReplQueueInterval();
 212   
 213    void setReplQueueInterval(long interval);
 214   
 215    int getReplQueueMaxElements();
 216   
 217    void setReplQueueMaxElements(int max_elements);
 218   
 219    /**
 220    * Returns the transaction isolation level.
 221    */
 222    String getIsolationLevel();
 223   
 224    /**
 225    * Set the transaction isolation level. This determines the locking strategy to be used
 226    */
 227    void setIsolationLevel(String level);
 228   
 229    /**
 230    * Returns whether or not any initial state transfer or subsequent partial
 231    * state transfer following an <code>activateRegion</code> call should
 232    * include in-memory state. Allows for warm/hot caches (true/false). The
 233    * characteristics of a state transfer can be further defined by a cache
 234    * loader's FetchPersistentState property.
 235    */
 236    boolean getFetchInMemoryState();
 237   
 238    /**
 239    * Sets whether or not any initial or subsequent partial state transfer
 240    * should include in-memory state.
 241    */
 242    void setFetchInMemoryState(boolean flag);
 243   
 244    /**
 245    * Gets the format version of the data transferred during an initial state
 246    * transfer or a call to {@link Region#activate()}. Different
 247    * releases of JBossCache may format this data differently; this property
 248    * identifies the format version being used by this cache instance.
 249    * <p/>
 250    * The default value for this property is
 251    * {@link org.jboss.cache.config.Configuration#DEFAULT_REPLICATION_VERSION}.
 252    * </p>
 253    *
 254    * @return a short identifying JBossCache release; e.g. <code>124</code>
 255    * for JBossCache 1.2.4
 256    */
 257    String getReplicationVersion();
 258   
 259    /**
 260    * Sets the format version of the data transferred during an initial state
 261    * transfer or a call to {@link Region#activate()}. Different
 262    * releases of JBossCache may format this data differently; this property
 263    * identifies the format version being used by this cache instance. Setting
 264    * this property to a value other than the default allows a cache instance
 265    * from a later release to interoperate with a cache instance from an
 266    * earlier release.
 267    *
 268    * @param version a short identifying JBossCache release;
 269    * e.g. <code>124</code> for JBossCache 1.2.4
 270    */
 271    void setReplicationVersion(String version);
 272   
 273    /**
 274    * Default max time to wait for a lock. If the lock cannot be acquired within this time, a LockingException will be thrown.
 275    *
 276    * @return long Max number of milliseconds to wait for a lock to be acquired
 277    */
 278    long getLockAcquisitionTimeout();
 279   
 280    /**
 281    * Set the max time for lock acquisition. A value of 0 means to wait forever (not recomended). Note that lock acquisition timeouts may be removed in the future when we have deadlock detection.
 282    *
 283    * @param timeout
 284    */
 285    void setLockAcquisitionTimeout(long timeout);
 286   
 287    String getTransactionManagerLookupClass();
 288   
 289    /**
 290    * Sets the class of the TransactionManagerLookup impl. This will attempt to create an instance, and will throw an exception if this fails.
 291    *
 292    * @param cl
 293    * @throws Exception
 294    */
 295    void setTransactionManagerLookupClass(String cl) throws Exception;
 296   
 297    TransactionManager getTransactionManager();
 298   
 299    void setTransactionManager(TransactionManager manager);
 300   
 301    void setNodeLockingScheme(String nodeLockingScheme);
 302   
 303    String getNodeLockingScheme();
 304   
 305    /**
 306    * Gets whether the entire tree is inactive upon startup, only responding
 307    * to replication messages after activateRegion is
 308    * called to activate one or more parts of the tree.
 309    * <p/>
 310    * This property is only relevant if {@link org.jboss.cache.config.Configuration#isUseRegionBasedMarshalling()} is
 311    * <code>true</code>.
 312    */
 313    boolean isInactiveOnStartup();
 314   
 315    /**
 316    * Sets whether the entire tree is inactive upon startup, only responding
 317    * to replication messages after {@link Region#activate()} is
 318    * called to activate one or more parts of the tree.
 319    * <p/>
 320    * This property is only relevant if {@link org.jboss.cache.config.Configuration#isUseRegionBasedMarshalling()} is
 321    * <code>true</code>.
 322    */
 323    void setInactiveOnStartup(boolean inactiveOnStartup);
 324   
 325    /**
 326    * Sets the buddy replication configuration element
 327    *
 328    * @param config
 329    */
 330    void setBuddyReplicationConfig(Element config);
 331   
 332    /**
 333    * Retrieves the buddy replication configuration element
 334    *
 335    * @return whatever was passed to {@link #setBuddyReplicationConfig(Element)}
 336    * or <code>null</code> if nothing was
 337    */
 338    Element getBuddyReplicationConfig();
 339   
 340    /**
 341    * Retrieves the JGroups multiplexer stack name if defined.
 342    *
 343    * @return the multiplexer stack name
 344    */
 345    String getMultiplexerStack();
 346   
 347    /**
 348    * Used with JGroups multiplexer, specifies stack to be used (e.g., fc-fast-minimalthreads)
 349    * This attribute is optional; if not provided, a default multiplexer stack will be used.
 350    *
 351    * @param stackName the name of the multiplexer stack
 352    */
 353    void setMultiplexerStack(String stackName);
 354   
 355    ChannelFactory getMuxChannelFactory();
 356   
 357    void setMuxChannelFactory(ChannelFactory factory);
 358   
 359    JChannelFactoryMBean getMultiplexerService();
 360   
 361    void setMultiplexerService(JChannelFactoryMBean muxService);
 362   
 363    }