db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r571055 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/services/cache/ iapi/store/access/ iapi/store/raw/ iapi/store/raw/data/ iapi/store/raw/xact/ impl/store/access/ impl/store/raw/data/ impl/store/raw/xact/
Date Thu, 30 Aug 2007 07:06:32 GMT
Author: kahatlen
Date: Thu Aug 30 00:06:31 2007
New Revision: 571055

URL: http://svn.apache.org/viewvc?rev=571055&view=rev
Log:
DERBY-2911 (partial) Removed unused methods from the CacheManager and
CacheFactory interfaces

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/CacheFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/CacheManager.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/TransactionController.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/Transaction.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/data/DataFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/xact/RawTransaction.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/RAMTransaction.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/xact/Xact.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/CacheFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/CacheFactory.java?rev=571055&r1=571054&r2=571055&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/CacheFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/CacheFactory.java
Thu Aug 30 00:06:31 2007
@@ -39,19 +39,5 @@
 	
 	public CacheManager newCacheManager(CacheableFactory holderFactory, String name,
 										int initialSize, int maximumSize);
-	
-	/**
-		Create a cache that uses the class represented by holderClass as
-		the holder class. This holderClass must implement Cacheable.
-
-		@param holderFactory    The Class object representing the holder class.
-		@param name			The name of the cache
-		@param initialSize	The number of initial holder objects that will be created
-		@param maximumSize  The maximum total size of the objects that the cache will hold
- 
-	*/
-	
-	public CacheManager newSizedCacheManager(CacheableFactory holderFactory, String name,
-										int initialSize, long maximumSize);
 }
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/CacheManager.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/CacheManager.java?rev=571055&r1=571054&r2=571055&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/CacheManager.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/CacheManager.java
Thu Aug 30 00:06:31 2007
@@ -31,21 +31,6 @@
 
 public interface CacheManager {
 
-    /**
-     * @return the current maximum size of the cache.
-     */
-	public long getMaximumSize();
-
-    /**
-     * Change the maximum size of the cache. If the size is decreased then cache entries
-     * will be thrown out.
-     *
-     * @param newSize the new maximum cache size
-     *
-     * @exception StandardException Standard Derby error policy
-     */
-	public void resize( long newSize) throws StandardException;
-
 	/**
         Find an object in the cache.
         <p>
@@ -112,24 +97,6 @@
 	*/
 	public Cacheable findCached(Object key) throws StandardException;
 
-    /**
-     * Determine whether a key is in the cache.
-     *
-     * <b>WARNING:</b> This method does not keep a lock on the entry or the cache,
so
-     * the return value could be made incorrect by the time that this method returns.
-     * Therefore this method should only be used for statistical purposes.
-     */
-    public boolean containsKey( Object key);
-    
-    /**
-     * Mark a set of entries as having been used. Normally this is done as a side effect
-     * of find() or findCached. If the entry has been replaced then this method
-     * does nothing.
-     *
-     * @param keys the key of the used entry.
-     */
-    public void setUsed( Object[] keys);
-    
 	/**
 		Create an object in the cache. The resulting object will match the key provided using the
equals()
 		method, i.e. the return Cacheable will have getIdentifier.equals(key) true.
@@ -280,31 +247,6 @@
 		were not gotten rid of because it was kept.
 	*/
 	public boolean discard(Matchable partialKey);
-
-	/**
-		Report the number of items in use (with Identity) in this cache.
-	 */
-	public int getNumberInUse();
-
-	/**
-		Return statistics about cache that may be implemented.
-	**/
-	public long[] getCacheStats();
-
-	/**
-		reset the cache statistics to 0.
-	**/
-	public void resetCacheStats();
-
-    /**
-     * Perform an operation on (approximately) all entries that matches the filter,
-     * or all entries if the filter is null.  Entries that are added while the
-     * cache is being scanned might or might not be missed.
-     *
-     * @param filter
-     * @param operator
-     */
-    public void scan( Matchable filter, Operator operator);
 
 	/**
 	 * Return a Collection of the Cacheables currently in the

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/TransactionController.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/TransactionController.java?rev=571055&r1=571054&r2=571055&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/TransactionController.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/TransactionController.java
Thu Aug 30 00:06:31 2007
@@ -1527,22 +1527,6 @@
 		throws StandardException;
 
     /**************************************************************************
-     * Interfaces previously defined in TcCacheStatIface:
-     **************************************************************************
-     */
-
-	/**
-		Get cache statistics for the specified cache
-	*/
-	public long[] getCacheStats(String cacheName);
-
-	/**
-		Reset the cache statistics for the specified cache
-	*/
-	public void resetCacheStats(String cacheName);
-
-
-    /**************************************************************************
      * Interfaces previously defined in TcLogIface:
      **************************************************************************
      */

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/Transaction.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/Transaction.java?rev=571055&r1=571054&r2=571055&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/Transaction.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/Transaction.java Thu Aug
30 00:06:31 2007
@@ -512,16 +512,6 @@
 	public FileResource getFileHandler();
 
 	/**
-		Get cache statistics for the specified cache
-	*/
-	public abstract long[] getCacheStats(String cacheName);
-
-	/**
-		Reset the cache statistics for the specified cache
-	*/
-	public abstract void resetCacheStats(String cacheName);
-
-	/**
 		Return true if any transaction is blocked, even if not by this one.
 	 */
 	public  boolean anyoneBlocked();

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/data/DataFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/data/DataFactory.java?rev=571055&r1=571054&r2=571055&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/data/DataFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/data/DataFactory.java
Thu Aug 30 00:06:31 2007
@@ -240,16 +240,6 @@
 	public void removeStubsOK();
 
 	/**
-		Get cache statistics for the specified cache
-	*/
-	public long[] getCacheStats(String cacheName);
-
-	/**
-		Reset the cache statistics for the specified cache
-	*/
-	public void resetCacheStats(String cacheName);
-
-	/**
 		Reclaim space used by this factory.  Called by post commit daemon.
 		@exception StandardException  Standard Derby exception policy
 	*/

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/xact/RawTransaction.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/xact/RawTransaction.java?rev=571055&r1=571054&r2=571055&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/xact/RawTransaction.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/xact/RawTransaction.java
Thu Aug 30 00:06:31 2007
@@ -91,16 +91,6 @@
 	public abstract LogFactory getLogFactory();
 
 	/**
-		Get cache statistics for the specified cache
-	*/
-	public abstract long[] getCacheStats(String cacheName);
-
-	/**
-		Reset the cache statistics for the specified cache
-	*/
-	public abstract void resetCacheStats(String cacheName);
-
-	/**
 		Get the log buffer to be used during this transaction.
 	*/
 	public abstract DynamicByteArrayOutputStream getLogBuffer();

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/RAMTransaction.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/RAMTransaction.java?rev=571055&r1=571054&r2=571055&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/RAMTransaction.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/RAMTransaction.java
Thu Aug 30 00:06:31 2007
@@ -432,13 +432,6 @@
 		context = rtc;
 	}
 
-	/**
-		Get cache statistics for the specified cache
-	*/
-	public long[] getCacheStats(String cacheName) {
-		return getRawStoreXact().getCacheStats(cacheName);
-	}
-
     private ConglomerateController openConglomerate(
     Conglomerate                    conglom,
     boolean                         hold,
@@ -552,15 +545,6 @@
 		scanControllers.add(sm);
 
 		return(sm);
-	}
-
-
-
-	/**
-		Reset the cache statistics for the specified cache
-	*/
-	public void resetCacheStats(String cacheName) {
-		getRawStoreXact().resetCacheStats(cacheName);
 	}
 
     /**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java?rev=571055&r1=571054&r2=571055&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
Thu Aug 30 00:06:31 2007
@@ -1357,46 +1357,6 @@
 		return pageCache;
 	}
 
-	public long[] getCacheStats(String cacheName) 
-    {
-
-		if (cacheName == null) 
-        {
-			// cache name is not specified, return the default.
-			return getPageCache().getCacheStats();
-		}
-
-		if (cacheName.equals("pageCache")) 
-        {
-			return getPageCache().getCacheStats();
-		} 
-        else
-        {
-			// return default set of cache.
-			return getPageCache().getCacheStats();
-        }
-	}
-
-	public void resetCacheStats(String cacheName) 
-    {
-		if (cacheName == null) 
-        {
-			// cache name is not specified, return the default.
-			getPageCache().resetCacheStats();
-			return;
-		}
-
-		if (cacheName.equals("pageCache")) 
-        {
-			getPageCache().resetCacheStats();
-		} 
-        else
-        {
-			// default
-			getPageCache().resetCacheStats();
-        }
-	}
-
 	/**
 		Ask the log factory to flush up to this log instant.
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/xact/Xact.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/xact/Xact.java?rev=571055&r1=571054&r2=571055&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/xact/Xact.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/xact/Xact.java Thu Aug
30 00:06:31 2007
@@ -329,20 +329,6 @@
 	}
 
 	/**
-		Get cache statistics for the specified cache
-	*/
-	public long[] getCacheStats(String cacheName) {
-		return getDataFactory().getCacheStats(cacheName);
-	}
-
-	/**
-		Reset the cache statistics for the specified cache
-	*/
-	public void resetCacheStats(String cacheName)  {
-		getDataFactory().resetCacheStats(cacheName);
-	}
-
-	/**
 		Return true if any transaction is currently blocked, even if not by
 		this transaction.
 



Mime
View raw message