Class PathMappedMavenGACache
- java.lang.Object
-
- org.commonjava.indy.pathmapped.cache.PathMappedMavenGACache
-
- All Implemented Interfaces:
org.commonjava.indy.action.IndyLifecycleAction,org.commonjava.indy.action.StartupAction
@ApplicationScoped public class PathMappedMavenGACache extends Object implements org.commonjava.indy.action.StartupAction
-
-
Field Summary
Fields Modifier and Type Field Description protected org.commonjava.indy.conf.IndyConfigurationconfigstatic StringSCANNED_STORES
-
Constructor Summary
Constructors Constructor Description PathMappedMavenGACache()PathMappedMavenGACache(org.commonjava.indy.conf.IndyConfiguration config, org.commonjava.indy.subsys.infinispan.CacheProducer cacheProducer, org.commonjava.indy.subsys.cassandra.CassandraClient cassandraClient, org.commonjava.indy.data.StoreDataManager storeDataManager, org.commonjava.maven.galley.cache.pathmapped.PathMappedCacheProvider cacheProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfill()StringgetId()Set<String>getScannedStores()intgetStartupPriority()Set<String>getStoresContaining(String gaPath)Get stores contain the target gaPath.voidinit()booleanisStarted()booleanmatchAny(List<org.commonjava.indy.model.core.ArtifactStore> concreteStores)Check if any candidate matches.voidreduce(String ga, Set<String> set, boolean isAsync)voidstart()
-
-
-
Field Detail
-
SCANNED_STORES
public static final String SCANNED_STORES
- See Also:
- Constant Field Values
-
config
@Inject protected org.commonjava.indy.conf.IndyConfiguration config
-
-
Constructor Detail
-
PathMappedMavenGACache
public PathMappedMavenGACache()
-
PathMappedMavenGACache
public PathMappedMavenGACache(org.commonjava.indy.conf.IndyConfiguration config, org.commonjava.indy.subsys.infinispan.CacheProducer cacheProducer, org.commonjava.indy.subsys.cassandra.CassandraClient cassandraClient, org.commonjava.indy.data.StoreDataManager storeDataManager, org.commonjava.maven.galley.cache.pathmapped.PathMappedCacheProvider cacheProvider)
-
-
Method Detail
-
init
@PostConstruct public void init()
-
start
public void start() throws org.commonjava.indy.action.IndyLifecycleException- Specified by:
startin interfaceorg.commonjava.indy.action.StartupAction- Throws:
org.commonjava.indy.action.IndyLifecycleException
-
isStarted
public boolean isStarted()
-
getStartupPriority
public int getStartupPriority()
- Specified by:
getStartupPriorityin interfaceorg.commonjava.indy.action.StartupAction
-
getId
public String getId()
- Specified by:
getIdin interfaceorg.commonjava.indy.action.IndyLifecycleAction
-
fill
public void fill()
-
getStoresContaining
public Set<String> getStoresContaining(String gaPath)
Get stores contain the target gaPath. It checks the inMemoryCache first. If not found, query db and update inMemoryCache.
-
matchAny
public boolean matchAny(List<org.commonjava.indy.model.core.ArtifactStore> concreteStores)
Check if any candidate matches. If no one matches, this is a signal to skip the GA filter.
-
-