Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

oracle.jdeveloper.vcs.spi
Class VCSStatusCache

java.lang.Object
  extended by java.util.Observable
      extended by oracle.jdeveloper.vcs.spi.VCSURLBasedCache
          extended by oracle.jdeveloper.vcs.spi.VCSStatusCache

public abstract class VCSStatusCache
extends VCSURLBasedCache

Utility class for caching URLs' version status values. This class takes care of all cache responsibilities. Concrete subclasses are required to provide the implementation for returning uncached statuses as determined by the version control system. The cache is observable; attached observers are updated with an array of URLs whose statuses have been cleared (and hence may have changed).

Since:
9.0.5

Constructor Summary
VCSStatusCache()
           
 
Method Summary
 void clear()
          Clears the cached version statuses for all URLs.
 void clear(java.net.URL url)
          Clears the cached version status for the given URL.
 void clear(java.net.URL[] urls)
          Clears the cached version statuses for the given URLs.
 void clear(URLFilter filter)
          Clears the cached version statuses for URLs accepted by the given filter.
protected  java.lang.Object[] createValueArray(int length)
           
 VCSStatus get(java.net.URL url)
          Gets the status of a single URL.
 VCSStatus[] get(java.net.URL[] urls)
          Gets the version statuses for the given URLs.
protected abstract  void getImpl(java.net.URL[] urls, VCSStatus[] statuses)
          Gets current statuses for the given URLs, populating the status array.
protected  void getValuesImpl(java.net.URL[] urls, java.lang.Object[] values)
           
 java.net.URL[] search(URLFilter filter)
          Searches the version status cache for URLs accepted by the given filter.
 
Methods inherited from class oracle.jdeveloper.vcs.spi.VCSURLBasedCache
addCacheListener, callUnderWriteLock, clearValue, clearValues, clearValues, clearValues, clearValues, clearValuesInternal, getValue, getValueInternal, getValueInternal, getValues, getValuesImpl, putValueInternal, putValueInternal, removeCacheListener, runUnderWriteLock, searchValues
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VCSStatusCache

public VCSStatusCache()
Method Detail

getValuesImpl

protected final void getValuesImpl(java.net.URL[] urls,
                                   java.lang.Object[] values)
                            throws java.lang.Exception
Specified by:
getValuesImpl in class VCSURLBasedCache
Throws:
java.lang.Exception

createValueArray

protected final java.lang.Object[] createValueArray(int length)
Overrides:
createValueArray in class VCSURLBasedCache

get

public final VCSStatus get(java.net.URL url)
                    throws java.lang.Exception
Gets the status of a single URL.

Parameters:
url - the URL for the status query.
Returns:
the current version status describing the URL.
Throws:
java.lang.Exception

get

public VCSStatus[] get(java.net.URL[] urls)
                throws java.lang.Exception
Gets the version statuses for the given URLs.

Parameters:
urls - the array of URLs for the status query.
Returns:
an array of current version statuses describing the URLs.
Throws:
java.lang.Exception - if a critical exception occurred.

clear

public void clear()
Clears the cached version statuses for all URLs.


clear

public void clear(java.net.URL url)
Clears the cached version status for the given URL.

Parameters:
url - the URL for clearing from the cache.

clear

public void clear(java.net.URL[] urls)
Clears the cached version statuses for the given URLs.

Parameters:
urls - the URLs for clearing from the cache.

clear

public void clear(URLFilter filter)
Clears the cached version statuses for URLs accepted by the given filter. This method takes care of firing updates which indicate that statuses may have changed.

Parameters:
filter - a filter that accepts URLs for clearing from the cache.

search

public java.net.URL[] search(URLFilter filter)
Searches the version status cache for URLs accepted by the given filter.

Parameters:
filter - a filter that accepts URLs to return.
Returns:
an array of URLs which were found in the cache.

getImpl

protected abstract void getImpl(java.net.URL[] urls,
                                VCSStatus[] statuses)
                         throws java.lang.Exception
Gets current statuses for the given URLs, populating the status array.

Parameters:
urls - the array of URLs for the status query.
statuses - the array of current version statuses to populate.
Throws:
java.lang.Exception - if a critical exception occurred.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

Copyright © 1997, 2010, Oracle. All rights reserved.