## org.eclipse.emf.transaction.impl
Class ResourceSetManager

    java.lang.Object
      org.eclipse.emf.transaction.impl.ResourceSetManager

    public final class ResourceSetManager

extends Object

The resource set manager keeps track of the load state of `Resource`s in a resource set managed by a transactional editing domain. It assists in the enforcement of write transaction semantics for certain kinds of changes to the state of a resource (in particular, its contents).

The resource set manager is a singleton rather than a per-editing-domain instance primarily because the notification filters need to be able to distinguish events coming from loading/unloading resources, and filters do not have any editing domain context. This is not a problem, as the resources are tracked by their object identity, so their states are absolute, not relative to any particular editing domain.

Method Summary
`static ResourceSetManager` `getInstance()` Obtains the singleton manager instance.
`boolean` `isLoaded(org.eclipse.emf.ecore.resource.Resource res)` Queries whether the specified resource is currently loaded.
`boolean` `isLoading(org.eclipse.emf.ecore.resource.Resource res)` Queries whether the specified resource is currently loading.
`boolean` `isUnloaded(org.eclipse.emf.ecore.resource.Resource res)` Queries whether the specified resource is currently unloaded.
`boolean` `isUnloading(org.eclipse.emf.ecore.resource.Resource res)` Queries whether the specified resource is currently unloading.
`void` `observe(org.eclipse.emf.ecore.resource.Resource res, org.eclipse.emf.common.notify.Notification notification)` Analyzes a notification from a resource for any potential state change.
`void` `observe(org.eclipse.emf.ecore.resource.ResourceSet rset)` Observes the specified resource set, usually only when the editing domain is initialized.
`void` `observe(org.eclipse.emf.ecore.resource.ResourceSet rset, org.eclipse.emf.common.notify.Notification notification)` Analyzes a notification from a resource set for any potential state changes in its resources.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getInstance

    public static ResourceSetManager getInstance()

  Obtains the singleton manager instance.

  Returns:
    the singleton instance

### observe

    public void observe(org.eclipse.emf.ecore.resource.ResourceSet rset)

  Observes the specified resource set, usually only when the editing domain is initialized. This resource set may already contain resources in a variety of states, so I will examine each of them in turn and record their states.

  Parameters:
    `rset` - a resource set

### observe

    public void observe(org.eclipse.emf.ecore.resource.ResourceSet rset,
                        org.eclipse.emf.common.notify.Notification notification)

  Analyzes a notification from a resource set for any potential state changes in its resources.

  Parameters:
    `rset` - a resource set sending a notification
    `notification` - the notification from the resource set

### observe

    public void observe(org.eclipse.emf.ecore.resource.Resource res,
                        org.eclipse.emf.common.notify.Notification notification)

  Analyzes a notification from a resource for any potential state change.

  Parameters:
    `res` - a resource
    `notification` - the notification from the resource

### isLoaded

    public boolean isLoaded(org.eclipse.emf.ecore.resource.Resource res)

  Queries whether the specified resource is currently loaded.

  Parameters:
    `res` - a resource
  Returns:
    `true` if the resource has completed loading and is not now unloading; `false`, otherwise

### isLoading

    public boolean isLoading(org.eclipse.emf.ecore.resource.Resource res)

  Queries whether the specified resource is currently loading.

  Parameters:
    `res` - a resource
  Returns:
    `true` if the resource is not yet loaded but is in the process of loading; `false`, otherwise

### isUnloading

    public boolean isUnloading(org.eclipse.emf.ecore.resource.Resource res)

  Queries whether the specified resource is currently unloading.

  Parameters:
    `res` - a resource
  Returns:
    `true` if the resource is loaded but is in the process of unloading; `false`, otherwise

### isUnloaded

    public boolean isUnloaded(org.eclipse.emf.ecore.resource.Resource res)

  Queries whether the specified resource is currently unloaded.

  Parameters:
    `res` - a resource
  Returns:
    `true` if the resource has completed unloading and is not now loading; `false`, otherwise

Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved.