public class ResourceBackedMetadataProvider extends AbstractReloadingMetadataProvider
Resource
.ObservableMetadataProvider.Observer
unmarshallerFactory
Constructor and Description |
---|
ResourceBackedMetadataProvider(Resource resource,
Timer timer,
long maxMetadataCacheDuration)
Deprecated.
|
ResourceBackedMetadataProvider(Timer timer,
Resource resource)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroys the metadata provider and frees any resources current held by it.
|
protected byte[] |
fetchMetadata()
Fetches metadata from a source.
|
protected String |
getMetadataIdentifier()
Gets an identifier which may be used to distinguish this metadata in logging statements.
|
boolean |
maintainExpiredMetadata()
Deprecated.
use
BaseMetadataProvider.requireValidMetadata() instead |
void |
setMaintainExpiredMetadata(boolean maintain)
Deprecated.
|
computeNextRefreshDelay, doGetMetadata, doInitialization, getExpirationTime, getLastRefresh, getLastUpdate, getMaxRefreshDelay, getMinRefreshDelay, getNextRefresh, getRefreshDelayFactor, inputstreamToByteArray, postProcessMetadata, processCachedMetadata, processNewMetadata, processNonExpiredMetadata, processPreExpiredMetadata, refresh, setMaxRefreshDelay, setMinRefreshDelay, setRefreshDelayFactor, unmarshallMetadata
emitChangeEvent, getObservers
clearDescriptorIndex, doGetEntitiesDescriptor, doGetEntityDescriptor, doGetRole, doGetRole, filterMetadata, getEntitiesDescriptor, getEntitiesDescriptorByName, getEntityDescriptor, getEntityDescriptorById, getEntityDescriptorById, getMetadata, getParserPool, getRole, getRole, initialize, isFailFastInitialization, isInitialized, isValid, releaseMetadataDOM, setFailFastInitialization, setInitialized, setParserPool, unmarshallMetadata
getMetadataFilter, requireValidMetadata, setMetadataFilter, setRequireValidMetadata
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEntitiesDescriptor, getEntityDescriptor, getMetadata, getMetadataFilter, getRole, getRole, requireValidMetadata, setMetadataFilter, setRequireValidMetadata
public ResourceBackedMetadataProvider(Resource resource, Timer timer, long maxMetadataCacheDuration) throws MetadataProviderException
resource
- resource from which to read the metadata file.timer
- task timer used to schedule metadata refresh tasksmaxMetadataCacheDuration
- maximum amount of time, in milliseconds, that metadata may be cached before being
re-readMetadataProviderException
- thrown if there is a problem retrieving information about the resourcepublic ResourceBackedMetadataProvider(Timer timer, Resource resource) throws MetadataProviderException
resource
- resource from which to read the metadata file.timer
- task timer used to schedule metadata refresh tasksMetadataProviderException
- thrown if there is a problem retrieving information about the resourcepublic boolean maintainExpiredMetadata()
BaseMetadataProvider.requireValidMetadata()
insteadpublic void setMaintainExpiredMetadata(boolean maintain)
BaseMetadataProvider.setRequireValidMetadata(boolean)
insteadmaintain
- whether cached metadata should be discarded if it expires and can not be refreshed.public void destroy()
destroy
in class AbstractReloadingMetadataProvider
protected String getMetadataIdentifier()
getMetadataIdentifier
in class AbstractReloadingMetadataProvider
protected byte[] fetchMetadata() throws MetadataProviderException
fetchMetadata
in class AbstractReloadingMetadataProvider
MetadataProviderException
- thrown if there is a problem fetching the metadataCopyright © 2018 JBoss by Red Hat. All rights reserved.