org.apache.maven.mercury.repository.cache.fs
Class MetadataCacheFs

java.lang.Object
  extended by org.apache.maven.mercury.repository.cache.fs.MetadataCacheFs
All Implemented Interfaces:
EventGenerator, RepositoryMetadataCache

public class MetadataCacheFs
extends java.lang.Object
implements RepositoryMetadataCache

Version:
$Id: MetadataCacheFs.java 720564 2008-11-25 18:58:02Z ogusakov $
Author:
Oleg Gusakov

Field Summary
static java.lang.String EVENT_FIND_GA
           
static java.lang.String EVENT_FIND_GAV
           
static java.lang.String EVENT_FIND_RAW
           
static java.lang.String EVENT_SAVE_RAW
           
static java.lang.String EVENT_UPDATE_GA
           
static java.lang.String EVENT_UPDATE_GAV
           
 
Method Summary
 RepositoryGAMetadata findGA(java.lang.String repoGuid, RepositoryUpdatePolicy up, ArtifactCoordinates coord)
           
 RepositoryGAVMetadata findGAV(java.lang.String repoGuid, RepositoryUpdatePolicy up, ArtifactCoordinates coord)
           
 byte[] findRaw(ArtifactBasicMetadata bmd)
           
static MetadataCacheFs getCache(java.io.File root)
          access to all known FS caches
 void register(MercuryEventListener listener)
           
 void saveRaw(ArtifactBasicMetadata bmd, byte[] rawBytes)
           
 void setEventManager(EventManager eventManager)
           
 void unRegister(MercuryEventListener listener)
           
 void updateGA(java.lang.String repoGuid, RepositoryGAMetadata gam)
           
 void updateGAV(java.lang.String repoGuid, RepositoryGAVMetadata gavm)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EVENT_FIND_GA

public static final java.lang.String EVENT_FIND_GA
See Also:
Constant Field Values

EVENT_FIND_GAV

public static final java.lang.String EVENT_FIND_GAV
See Also:
Constant Field Values

EVENT_FIND_RAW

public static final java.lang.String EVENT_FIND_RAW
See Also:
Constant Field Values

EVENT_UPDATE_GA

public static final java.lang.String EVENT_UPDATE_GA
See Also:
Constant Field Values

EVENT_UPDATE_GAV

public static final java.lang.String EVENT_UPDATE_GAV
See Also:
Constant Field Values

EVENT_SAVE_RAW

public static final java.lang.String EVENT_SAVE_RAW
See Also:
Constant Field Values
Method Detail

getCache

public static MetadataCacheFs getCache(java.io.File root)
                                throws java.io.IOException
access to all known FS caches

Parameters:
root -
Returns:
Throws:
java.io.IOException

findGA

public RepositoryGAMetadata findGA(java.lang.String repoGuid,
                                   RepositoryUpdatePolicy up,
                                   ArtifactCoordinates coord)
                            throws MetadataCorruptionException
Specified by:
findGA in interface RepositoryMetadataCache
Throws:
MetadataCorruptionException

findGAV

public RepositoryGAVMetadata findGAV(java.lang.String repoGuid,
                                     RepositoryUpdatePolicy up,
                                     ArtifactCoordinates coord)
                              throws MetadataCorruptionException
Specified by:
findGAV in interface RepositoryMetadataCache
Throws:
MetadataCorruptionException

updateGA

public void updateGA(java.lang.String repoGuid,
                     RepositoryGAMetadata gam)
              throws MetadataCacheException
Specified by:
updateGA in interface RepositoryMetadataCache
Throws:
MetadataCacheException

updateGAV

public void updateGAV(java.lang.String repoGuid,
                      RepositoryGAVMetadata gavm)
               throws MetadataCacheException
Specified by:
updateGAV in interface RepositoryMetadataCache
Throws:
MetadataCacheException

findRaw

public byte[] findRaw(ArtifactBasicMetadata bmd)
               throws MetadataCacheException
Specified by:
findRaw in interface RepositoryMetadataCache
Throws:
MetadataCacheException

saveRaw

public void saveRaw(ArtifactBasicMetadata bmd,
                    byte[] rawBytes)
             throws MetadataCacheException
Specified by:
saveRaw in interface RepositoryMetadataCache
Throws:
MetadataCacheException

register

public void register(MercuryEventListener listener)
Specified by:
register in interface EventGenerator

unRegister

public void unRegister(MercuryEventListener listener)
Specified by:
unRegister in interface EventGenerator

setEventManager

public void setEventManager(EventManager eventManager)
Specified by:
setEventManager in interface EventGenerator


Copyright © 2002-2008 The Apache Software Foundation. All Rights Reserved.