|
||||||||||
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 java.lang.String |
SERVICE_NAME
Service name for the internal cache manager service. |
Constructor Summary | |
---|---|
CacheManager(org.eclipse.equinox.p2.core.IAgentLocation agentLocation)
|
Method Summary | |
---|---|
java.io.File |
createCache(java.net.URI repositoryLocation,
java.lang.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 java.io.File |
getCache(java.net.URI repositoryLocation,
java.lang.String prefix)
Determines the local file path of the repository's cache file. |
protected java.io.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(java.io.File cacheFile,
java.net.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 java.lang.String SERVICE_NAME
Constructor Detail |
---|
public CacheManager(org.eclipse.equinox.p2.core.IAgentLocation agentLocation)
Method Detail |
---|
public java.io.File createCache(java.net.URI repositoryLocation, java.lang.String prefix, org.eclipse.core.runtime.IProgressMonitor monitor) throws java.io.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.CacheManager
repositoryLocation
- 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.
java.io.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
java.io.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 canceledprotected java.io.File getCache(java.net.URI repositoryLocation, java.lang.String prefix)
getCache
in class org.eclipse.equinox.internal.p2.repository.CacheManager
repositoryLocation
- 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 java.io.File getCacheDirectory()
getCacheDirectory
in class org.eclipse.equinox.internal.p2.repository.CacheManager
public void setEventBus(org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus newBus)
setEventBus
in class org.eclipse.equinox.internal.p2.repository.CacheManager
public 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(java.io.File cacheFile, java.net.URI remoteFile, long lastModifiedRemote, org.eclipse.core.runtime.SubMonitor submonitor) throws java.io.FileNotFoundException, java.io.IOException, org.eclipse.equinox.p2.core.ProvisionException
updateCache
in class org.eclipse.equinox.internal.p2.repository.CacheManager
java.io.FileNotFoundException
java.io.IOException
org.eclipse.equinox.p2.core.ProvisionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |