|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.equinox.internal.p2.repository.CacheManager
copied.org.eclipse.equinox.internal.p2.repository.CacheManager
public class CacheManager
A class to manage metadata cache files. Creating the cache files will place the file in the AgentData location in a cache directory. Using the bus listeners will allow the manager to listen for repository events. When a repository is removed, it will remove the cache file if one was created for the repository.
| Field Summary | |
|---|---|
static String |
SERVICE_NAME
Service name for the internal cache manager service. |
| Constructor Summary | |
|---|---|
CacheManager(org.eclipse.equinox.p2.core.IAgentLocation agentLocation)
|
|
| Method Summary | |
|---|---|
File |
createCache(URI repositoryLocation,
String prefix,
org.eclipse.core.runtime.IProgressMonitor monitor)
Returns a local cache file with the contents of the given remote location, or null if a local cache could not be created. |
protected File |
getCache(URI repositoryLocation,
String prefix)
Determines the local file path of the repository's cache file. |
protected File |
getCacheDirectory()
Returns the file corresponding to the data area to be used by the cache manager. |
void |
setEventBus(org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus newBus)
|
void |
unsetEventBus(org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus oldBus)
|
protected void |
updateCache(File cacheFile,
URI remoteFile,
long lastModifiedRemote,
org.eclipse.core.runtime.SubMonitor submonitor)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SERVICE_NAME
| Constructor Detail |
|---|
public CacheManager(org.eclipse.equinox.p2.core.IAgentLocation agentLocation)
| Method Detail |
|---|
public File createCache(URI repositoryLocation,
String prefix,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws IOException,
org.eclipse.equinox.p2.core.ProvisionException
null if a local cache could not be created.
createCache in class org.eclipse.equinox.internal.p2.repository.CacheManagerrepositoryLocation - The remote location to be cachedprefix - The prefix to use when creating the cache filemonitor - a progress monitor
File object pointing to the cache file or null
if the location is not a repository.
FileNotFoundException - if neither jar nor xml index file exists at given location
org.eclipse.equinox.internal.p2.repository.AuthenticationFailedException - if jar not available and xml causes authentication fail
IOException - on general IO errors
org.eclipse.equinox.p2.core.ProvisionException - on any error (e.g. user cancellation, unknown host, malformed address, connection refused, etc.)
org.eclipse.core.runtime.OperationCanceledException - - if user canceled
protected File getCache(URI repositoryLocation,
String prefix)
getCache in class org.eclipse.equinox.internal.p2.repository.CacheManagerrepositoryLocation - The location to compute the cache forprefix - The prefix to use for this location
File pointing to the cache file or null if
the cache file does not exist.protected File getCacheDirectory()
getCacheDirectory in class org.eclipse.equinox.internal.p2.repository.CacheManagerpublic void setEventBus(org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus newBus)
setEventBus in class org.eclipse.equinox.internal.p2.repository.CacheManagerpublic void unsetEventBus(org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus oldBus)
unsetEventBus in class org.eclipse.equinox.internal.p2.repository.CacheManager
protected void updateCache(File cacheFile,
URI remoteFile,
long lastModifiedRemote,
org.eclipse.core.runtime.SubMonitor submonitor)
throws FileNotFoundException,
IOException,
org.eclipse.equinox.p2.core.ProvisionException
updateCache in class org.eclipse.equinox.internal.p2.repository.CacheManagerFileNotFoundException
IOException
org.eclipse.equinox.p2.core.ProvisionException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||