public class BatchLinkableResource extends DerivedStateAwareResource implements ISynchronizable<BatchLinkableResource>, IBatchLinkableResource, JvmMemberInitializableResource
getEObject(String), the BatchLinkingService is used
to resolve a chunk of proxies.LazyLinkingResource.CyclicLinkingException, LazyLinkingResource.DiagnosticMessageContextorg.eclipse.emf.ecore.resource.impl.ResourceImpl.ContentsEList<E extends Object & org.eclipse.emf.ecore.EObject>, org.eclipse.emf.ecore.resource.impl.ResourceImpl.ModificationTrackingAdapterorg.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends Object & org.eclipse.emf.common.notify.Adapter>, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterListorg.eclipse.emf.ecore.resource.Resource.Diagnostic, org.eclipse.emf.ecore.resource.Resource.Factory, org.eclipse.emf.ecore.resource.Resource.Internal, org.eclipse.emf.ecore.resource.Resource.IOWrappedExceptionfullyInitialized, isInitializingUNRESOLVABLE_FRAGMENTresolving, UNRESOLVEABLE_PROXIES_KEYisUpdating, operationCanceledManager, OPTION_ENCODING, OPTION_FORMAT, OPTION_RESOLVE_ALL, OPTION_SERIALIZATION_OPTIONScontents, defaultDeleteOptions, defaultLoadOptions, defaultSaveOptions, errors, intrinsicIDToEObjectMap, isLoaded, isLoading, isModified, modificationTrackingAdapter, resourceSet, timeStamp, unloadingContents, uri, warningseAdapters, EDELIVER, eFlags, ELAST_NOTIFIER_FLAGOPTION_CIPHER, OPTION_LINE_DELIMITER, OPTION_LINE_DELIMITER_UNSPECIFIED, OPTION_SAVE_ONLY_IF_CHANGED, OPTION_SAVE_ONLY_IF_CHANGED_FILE_BUFFER, OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER, OPTION_ZIP, RESOURCE__CONTENTS, RESOURCE__ERRORS, RESOURCE__IS_LOADED, RESOURCE__IS_MODIFIED, RESOURCE__IS_TRACKING_MODIFICATION, RESOURCE__RESOURCE_SET, RESOURCE__TIME_STAMP, RESOURCE__URI, RESOURCE__WARNINGS| Constructor and Description |
|---|
BatchLinkableResource() |
| Modifier and Type | Method and Description |
|---|---|
void |
addJvmMemberInitializer(Runnable runnable)
|
protected void |
doDiscardDerivedState() |
void |
ensureJvmMembersInitialized()
Executes any
Runnables added through addJvmMemberInitializer(Runnable) |
<Result> Result |
execute(IUnitOfWork<Result,? super BatchLinkableResource> unit) |
org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> |
getContents()
Implementation detail: Overridden to use the shared
lock. |
org.eclipse.emf.ecore.EObject |
getEObject(String uriFragment)
Delegates to the
BatchLinkingService if the requested reference is
linkeable in batch mode. |
Object |
getLock()
Returns the lock of the owning
ResourceSet, if it exposes such a lock. |
protected org.eclipse.emf.ecore.EObject |
handleCyclicResolution(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple) |
boolean |
hasJvmMemberInitializers() |
boolean |
isInitializingJvmMembers() |
void |
linkBatched(CancelIndicator monitor) |
void |
resolveLazyCrossReferences(CancelIndicator monitor)
Delegates to the BatchLinkingService to resolve all references.
|
clearInternalState, discardDerivedState, doGetContents, doUnload, getEObjectForURIFragmentRootSegment, getUnloadingContents, getURIFragmentRootSegment, installDerivedState, isFullyInitialized, isInitializing, setDerivedStateComputer, setFullyInitialized, updateInternalState, updateInternalStategetPortableURIs, getResourceDescription, getResourceStorageFacade, getUnresolvableURIFragments, isLoadedFromStorage, load, loadFromStorage, setIsLoadedFromStorage, setResourceDescriptionaddLazyProxyInformation, clearLazyProxyInformation, createAndAddDiagnostic, createAndAddDiagnostic, createDiagnostic, createDiagnosticMessage, createDiagnosticMessageContext, doLinking, doLoad, doResolveLazyCrossReference, getDiagnosticList, getDiagnosticMessageProvider, getEncoder, getEObject, getLazyProxyInformation, getLinkingHelper, getLinkingService, getReferences, hasLazyProxyInformation, isEagerLinking, isPotentialLazyCrossReference, isUnresolveableProxyCacheable, markUnresolvable, removeDiagnostic, removeLazyProxyInformation, resolveLazyCrossReference, setDiagnosticMessageProvider, setEagerLinking, setEncoder, setLinkingHelper, setLinkingServiceaddSyntaxDiagnostic, addSyntaxErrors, basicGetEObject, clearErrorsAndWarnings, createReader, doSave, getCache, getConcreteSyntaxValidator, getEncoding, getFragmentProvider, getLanguageName, getLinker, getModificationStamp, getParser, getParseResult, getResourceServiceProvider, getSerializer, getUnloader, getURIFragment, isValidationDisabled, reattachModificationTracker, relink, reparse, setCache, setEncodingFromOptions, setFragmentProvider, setInjectedParser, setLanguageName, setLinker, setModificationStamp, setParser, setParseResult, setResourceServiceProvider, setSerializer, setUnloader, setValidationDisabled, unload, update, validateConcreteSyntaxaddModificationTrackingAdapters, attached, attachedHelper, basicSetResourceSet, createModificationTrackingAdapter, delete, detached, detachedHelper, getAllContents, getAllProperContents, getAllProperContents, getDefaultURIConverter, getEObject, getEObjectByID, getErrors, getIntrinsicIDToEObjectMap, getResourceSet, getTimeStamp, getURI, getURIConverter, getWarnings, handleLoadResponse, handleSaveResponse, isAttachedDetachedHelperRequired, isContentZipEntry, isLoaded, isLoading, isModified, isTrackingModification, load, mergeMaps, newContentZipEntry, removeModificationTrackingAdapters, save, save, saveOnlyIfChangedWithFileBuffer, saveOnlyIfChangedWithMemoryBuffer, setIntrinsicIDToEObjectMap, setLoaded, setModified, setTimeStamp, setTrackingModification, setURI, toKeyString, toString, unload, unloaded, useZipeAdapters, eBasicAdapters, eDeliver, eSetDelivereBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotifypublic Object getLock()
ResourceSet, if it exposes such a lock.
Otherwise this resource itself is used as the lock context.getLock in interface ISynchronizable<BatchLinkableResource>public <Result> Result execute(IUnitOfWork<Result,? super BatchLinkableResource> unit) throws Exception
execute in interface ISynchronizable<BatchLinkableResource>Exceptionpublic org.eclipse.emf.ecore.EObject getEObject(String uriFragment)
BatchLinkingService if the requested reference is
linkeable in batch mode.
Implementation detail: This specialization of getEObject
synchronizes on the lock which is exposed by the synchronizable
resource rather than on the resource directly. This guards against reentrant resolution
from different threads that could block each other.
Usually one would want to lock only in the BatchLinkingService but we could
have intermixed lazy cross reference and vanilla EMF cross references which again could lead to a
dead lock.getEObject in interface org.eclipse.emf.ecore.resource.ResourcegetEObject in class StorageAwareResourcepublic org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> getContents()
Implementation detail: Overridden to use the shared lock.
getContents in interface org.eclipse.emf.ecore.resource.ResourcegetContents in class DerivedStateAwareResourcepublic void resolveLazyCrossReferences(CancelIndicator monitor)
resolveLazyCrossReferences in class LazyLinkingResourceprotected org.eclipse.emf.ecore.EObject handleCyclicResolution(Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> triple) throws AssertionError
handleCyclicResolution in class LazyLinkingResourceAssertionErrorpublic void linkBatched(CancelIndicator monitor)
linkBatched in interface IBatchLinkableResourcepublic void ensureJvmMembersInitialized()
Runnables added through addJvmMemberInitializer(Runnable)ensureJvmMembersInitialized in interface JvmMemberInitializableResourcepublic boolean isInitializingJvmMembers()
isInitializingJvmMembers in interface JvmMemberInitializableResourceprotected void doDiscardDerivedState()
doDiscardDerivedState in class DerivedStateAwareResourcepublic void addJvmMemberInitializer(Runnable runnable)
addJvmMemberInitializer in interface JvmMemberInitializableResourcepublic boolean hasJvmMemberInitializers()
hasJvmMemberInitializers in interface JvmMemberInitializableResourceCopyright © 2015. All Rights Reserved.