oracle.jdeveloper.vcs.spi
Class VCSStatusCache
java.lang.Object
java.util.Observable
oracle.jdeveloper.vcs.spi.VCSStatusCache
- public abstract class VCSStatusCache
- extends java.util.Observable
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
Field Summary |
protected java.util.Map |
_cache
|
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. |
VCSVersionStatus |
get(java.net.URL url)
Gets the status of a single URL. |
VCSVersionStatus[] |
get(java.net.URL[] urls)
Gets the version statuses for the given URLs. |
protected abstract void |
getImpl(java.net.URL[] urls, VCSVersionStatus[] statuses)
Gets current statuses for the given URLs, populating the status array. |
java.net.URL[] |
search(URLFilter filter)
Searches the version status cache for URLs accepted by the given filter. |
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 |
_cache
protected final java.util.Map _cache
VCSStatusCache
public VCSStatusCache()
get
public final VCSVersionStatus 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 VCSVersionStatus[] 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,
VCSVersionStatus[] 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.
Copyright © 1997, 2004, Oracle. All rights reserved.