com.esri.arcgis.carto
Interface IMapCache

All Superinterfaces:
Serializable
All Known Implementing Classes:
Map

public interface IMapCache
extends Serializable

Provides access to Map spatial cache.

Remarks

IMapCache provides access to the metods and properties used to manage a map's cache. Map cache is an extension of the earlier Edit Cache concept and is useful in more situations because it works both inside and outside and edit session.

If you're working with data stored in a geodatabase, building the map cache can often speed up common ArcMap tasks. The map cache allows you to temporarily store the features in the current map display extent to your local machine's memory. Because retrieving the features from local memory is a fast operation, using the map cache will often result in performance improvements.

The map cache only stores features in geodatabases, so no data from rasters, coverages, or shapefiles is cached. The map cache is most useful when you will be working within a specific area of a map.

For example, if you are working with data in a multiuser geodatabase that serves features over a network, features in the current extent must be retrieved from the source database each time your display is updated. Building a map cache, however, can reduce the load on your network and the geodatabase since the map accesses this information from your computer's RAM. Since features are cached on the client, it reduces the number of queries the client needs to execute on the server.

Drawing large or complex datasets, labeling, editing, selecting features, retrieving the same features for multiple layers on a map, and drawing features using a definition query are some of the activities that can often benefit from a map cache. Labeling, for example, can be a slow and costly process for the geodatabase, requiring multiple roundtrips to the geodatabase as the label engine attempts to place the maximum number of labels on the map.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux


Method Summary
 void buildCache()
          Build the spatial cache.
 void emptyCache()
          Empty the map cache.
 IEnvelope getCacheExtent()
          Current cache extent.
 double getMaxScale()
          The maximum scale for the cache to be built.
 boolean isAutoCacheActive()
          Indicates whether the autocache is active.
 boolean isCacheable()
          Indicates whether a map cache can be created.
 boolean isScaleLimit()
          Indicates whether there is a scale limit.
 void refreshAutoCache()
          Refresh the autocache.
 void setAutoCacheActive(boolean active)
          Indicates whether the autocache is active.
 void setMaxScale(double pMaxScale)
          The maximum scale for the cache to be built.
 void setScaleLimit(boolean limited)
          Indicates whether there is a scale limit.
 

Method Detail

buildCache

void buildCache()
                throws IOException,
                       AutomationException
Build the spatial cache.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMaxScale

void setMaxScale(double pMaxScale)
                 throws IOException,
                        AutomationException
The maximum scale for the cache to be built.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
pMaxScale - The pMaxScale (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMaxScale

double getMaxScale()
                   throws IOException,
                          AutomationException
The maximum scale for the cache to be built.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The pMaxScale
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCacheable

boolean isCacheable()
                    throws IOException,
                           AutomationException
Indicates whether a map cache can be created.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The cacheable
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isAutoCacheActive

boolean isAutoCacheActive()
                          throws IOException,
                                 AutomationException
Indicates whether the autocache is active.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The active
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAutoCacheActive

void setAutoCacheActive(boolean active)
                        throws IOException,
                               AutomationException
Indicates whether the autocache is active.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
active - The active (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isScaleLimit

boolean isScaleLimit()
                     throws IOException,
                            AutomationException
Indicates whether there is a scale limit.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The limited
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setScaleLimit

void setScaleLimit(boolean limited)
                   throws IOException,
                          AutomationException
Indicates whether there is a scale limit.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
limited - The limited (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCacheExtent

IEnvelope getCacheExtent()
                         throws IOException,
                                AutomationException
Current cache extent.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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.

emptyCache

void emptyCache()
                throws IOException,
                       AutomationException
Empty the map cache.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

refreshAutoCache

void refreshAutoCache()
                      throws IOException,
                             AutomationException
Refresh the autocache.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.