com.esri.arcgis.geodatabase
Class ISpatialCacheManagerProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.geodatabase.ISpatialCacheManagerProxy
All Implemented Interfaces:
ISpatialCacheManager, Externalizable, Serializable
Direct Known Subclasses:
ISpatialCacheManager2Proxy

public class ISpatialCacheManagerProxy
extends com.esri.arcgis.interop.Dispatch
implements ISpatialCacheManager, Serializable

Provides access to members that control the Spatial Cache Management.

Superseded By

ISpatialCacheManager3

Description

ISpatialCacheManager is an optional interface that can be used to enable and disable feature caching within a specified spatial envelope.

Remarks

Enabling feature caching improves the performance of all spatial searches whose query geometry lies within the cached area and and also improves the performance of all queries that retrieve features by object ID (for example, GetRow, GetFeature, GetRows, and GetFeatures). At ArcGIS release 8.3 and earlier, caching of features using ISpatialCacheManager requires that there be an active edit session. At ArcGIS release 9.0 and higher, using ISpatialCacheManager does not require an active edit session.

Use of the cache is transparent to editing applications. Objects retrieved using non-recycling cursors may be updated and stored by the editing application. As in the uncached case, the geodatabase takes care of ensuring read and query consistency when queries are issued againt updated objects. The cache is exposed to end users as the edit cache in ArcMap for ArcGIS release 8.3 and earlier, and the map cache for ArcGIS releases 9.0 and higher. The cache improves performance significantly for network editing when working with ArcSDE geodatabases.

The SpatialCacheManager optimistically builds caches for features within the workspace. It caches the features in the cache extent for any open feature class. Note that opening a feature class that participates in a topology or geometric network will also open all other feature classes participating in the topology or geometric network. To correctly use the cache, you should be aware of which feature classes are open within a workspace. If a reference to the workspace is returned from a map document, the open feature classes will include all the feature classes for that workspace in the map. If you have opened the workspace through the Geodatabase API, by using a method such as IFeatureWorkspace::OpenFeatureDataset, only those features from feature classes that have been explicitly opened using the IFeatureWorkspace::OpenFeatureClass method will be cached.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also:
IEnvelope, Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  ISpatialCacheManagerProxy()
           
  ISpatialCacheManagerProxy(Object obj)
           
protected ISpatialCacheManagerProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 void emptyCache()
          Empties the spatial cache.
 void fillCache(IEnvelope pExtent)
          Fills the spatial cache using the specified extent.
 IEnvelope getCacheExtent()
          The extent of the spatial cache.
 boolean isCacheIsFull()
          Indicates if the spatial cache is full.
 void removeListener(String iidStr, Object theListener)
           
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

ISpatialCacheManagerProxy

public ISpatialCacheManagerProxy()

ISpatialCacheManagerProxy

public ISpatialCacheManagerProxy(Object obj)
                          throws IOException
Throws:
IOException

ISpatialCacheManagerProxy

protected ISpatialCacheManagerProxy(Object obj,
                                    String iid)
                             throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

fillCache

public void fillCache(IEnvelope pExtent)
               throws IOException,
                      AutomationException
Fills the spatial cache using the specified extent.

Remarks

The CacheIsFull property returns true if the cache is full (the cache is active). The FillCache method is used to make the cache active and to set the boundary of the cache. Calling this method causes the workspace to fetch objects from the database and fill the cache. Only features in open feature classes within the cache extent are fetched. Opening a feature class that participates in a topology or geometric network will also open all other feature classes participating in the topology or geometric network.

The time to fill the cache and the amount of memory consumed with the cache depends on the extent of the cache and the density and size of features in the feature classes being cached.

It should be noted that all attributes of a feature within the envelope will be cached when the call is made to FillCache. Also, only those features that are in currently open feature classes will be cached. Therefore if you only want to perform spatial searches against a specific feature class it would make sense to only have that feature class open when the cache is filled. The more feature classes open when FillCache is called the more expensive the fill cache operation is.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
fillCache in interface ISpatialCacheManager
Parameters:
pExtent - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

emptyCache

public void emptyCache()
                throws IOException,
                       AutomationException
Empties the spatial cache.

Remarks

The EmptyCache method empties the cache and makes it inactive.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
emptyCache in interface ISpatialCacheManager
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCacheIsFull

public boolean isCacheIsFull()
                      throws IOException,
                             AutomationException
Indicates if the spatial cache is full.

Remarks

The CacheIsFull property returns true if the cache is full (the cache is active). The FillCache method is used to make the cache active and to set the boundary of the cache. Calling FillCache causes the workspace to fetch objects from the database and fill the cache. The time to fill the cache and the amount of memory consumed with the cache depends on the extent of the cache and the density and size of features in the feature classes being cached.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isCacheIsFull in interface ISpatialCacheManager
Returns:
The isFull
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCacheExtent

public IEnvelope getCacheExtent()
                         throws IOException,
                                AutomationException
The extent of the spatial cache.

Remarks

The CacheExtent property returns the envelope that represents the current boundary of the cached area. An empty envelope is returned if the cache is empty (the cache is not active).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getCacheExtent in interface ISpatialCacheManager
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.