@Named public class NegativeCacheFacetImpl extends org.sonatype.nexus.repository.FacetSupport implements NegativeCacheFacet
NegativeCacheFacet
implementation.Constructor and Description |
---|
NegativeCacheFacetImpl(org.sonatype.nexus.cache.CacheHelper cacheHelper) |
Modifier and Type | Method and Description |
---|---|
protected void |
doConfigure(org.sonatype.nexus.repository.config.Configuration configuration) |
protected void |
doDelete() |
protected void |
doDestroy() |
protected void |
doInit(org.sonatype.nexus.repository.config.Configuration configuration) |
protected void |
doUpdate(org.sonatype.nexus.repository.config.Configuration configuration) |
protected void |
doValidate(org.sonatype.nexus.repository.config.Configuration configuration) |
org.sonatype.nexus.repository.view.Status |
get(NegativeCacheKey key)
Retrieve an entry from negative cache.
|
NegativeCacheKey |
getCacheKey(org.sonatype.nexus.repository.view.Context context)
Retrieves the cache key based on context.
|
String |
getCacheName() |
void |
invalidate()
Removes all entries from negative cache.
|
void |
invalidate(NegativeCacheKey key)
Removes an entry from negative cache.
|
void |
invalidateSubset(NegativeCacheKey key)
Removes entry for passed in parent key and all is children (using
NegativeCacheKey.isParentOf(NegativeCacheKey) ). |
void |
put(NegativeCacheKey key,
org.sonatype.nexus.repository.view.Status status)
Add an entry to negative cache
|
attach, delete, destroy, doStart, doStop, facet, getEventBus, getEventManager, getRepository, getStateGuard, init, installDependencies, optionalFacet, start, stop, update, validate
@Inject public NegativeCacheFacetImpl(org.sonatype.nexus.cache.CacheHelper cacheHelper)
protected void doValidate(org.sonatype.nexus.repository.config.Configuration configuration) throws Exception
doValidate
in class org.sonatype.nexus.repository.FacetSupport
Exception
protected void doConfigure(org.sonatype.nexus.repository.config.Configuration configuration) throws Exception
doConfigure
in class org.sonatype.nexus.repository.FacetSupport
Exception
protected void doInit(org.sonatype.nexus.repository.config.Configuration configuration) throws Exception
doInit
in class org.sonatype.nexus.repository.FacetSupport
Exception
protected void doUpdate(org.sonatype.nexus.repository.config.Configuration configuration) throws Exception
doUpdate
in class org.sonatype.nexus.repository.FacetSupport
Exception
protected void doDelete() throws Exception
doDelete
in class org.sonatype.nexus.repository.FacetSupport
Exception
protected void doDestroy() throws Exception
doDestroy
in class org.sonatype.nexus.repository.FacetSupport
Exception
public org.sonatype.nexus.repository.view.Status get(NegativeCacheKey key)
NegativeCacheFacet
get
in interface NegativeCacheFacet
key
- cache keyStatus
or null if no cache entry foundpublic void put(NegativeCacheKey key, org.sonatype.nexus.repository.view.Status status)
NegativeCacheFacet
put
in interface NegativeCacheFacet
key
- cache keystatus
- (404) status to be cachedpublic void invalidate(NegativeCacheKey key)
NegativeCacheFacet
invalidate
in interface NegativeCacheFacet
key
- cache keypublic void invalidateSubset(NegativeCacheKey key)
NegativeCacheFacet
NegativeCacheKey.isParentOf(NegativeCacheKey)
).invalidateSubset
in interface NegativeCacheFacet
key
- parent cache keypublic void invalidate()
NegativeCacheFacet
invalidate
in interface NegativeCacheFacet
public NegativeCacheKey getCacheKey(org.sonatype.nexus.repository.view.Context context)
NegativeCacheFacet
getCacheKey
in interface NegativeCacheFacet
context
- view contextpublic String getCacheName()
Copyright © 2008–2021 Sonatype, Inc.. All rights reserved.