public class

LocatorSettings

extends Object
java.lang.Object
   ↳ com.esri.core.tasks.geocode.LocatorSettings

Class Overview

Class used to control memory and performance options for locators created with local data.

Summary

Public Constructors
LocatorSettings()
Default constructor for LocatorSettings.
Public Methods
boolean getCacheRelations()
Return whether or not relations will be cached.
boolean getExcludeRedundantRelations()
Returns whether or not redundant relations will be excluded.
long getMemoryLimit()
Returns the memory limit (in megabytes) for the locator.
boolean getPreloadDictionaries()
Return whether or not dictionaries will be preloaded.
void setCacheRelations(boolean cache)
Set whether or not the locator will cache data loaded from relations.
void setExcludeRedundantRelations(boolean exclude)
Sets whether or not the locator will load and use relations that can be replaced by other, more general relations.
void setMemoryLimit(long limit)
Sets the memory limit in megabytes for the locator.
void setPreloadDictionaries(boolean preload)
Set whether or not the locator will preload dictionaries into memory.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public LocatorSettings ()

Default constructor for LocatorSettings. The following settings are set by default:
Preload Dictionaries = false setPreloadDictionaries(boolean)
Cache Relations = false setCacheRelations(boolean)
Exclude Redundant Relations = true setExcludeRedundantRelations(boolean)
Memory Limit = 200 Megabytes setMemoryLimit(long)

Public Methods

public boolean getCacheRelations ()

Return whether or not relations will be cached. See setCacheRelations(boolean) for more information.

Returns
boolean true if relations will be cached.

public boolean getExcludeRedundantRelations ()

Returns whether or not redundant relations will be excluded. See setExcludeRedundantRelations(boolean) for more information.

Returns
boolean true if redundant relations will be excluded.

public long getMemoryLimit ()

Returns the memory limit (in megabytes) for the locator. See setMemoryLimit(long) for more information.

Returns
long The memory limit in megabytes.

public boolean getPreloadDictionaries ()

Return whether or not dictionaries will be preloaded. See setPreloadDictionaries(boolean) for more information.

Returns
boolean true if dictionaries will be preloaded into memory.

public void setCacheRelations (boolean cache)

Set whether or not the locator will cache data loaded from relations. This increases performance, but also increases memory consumptions. Not recommended for mobile applications with tight memory constraints.

Parameters
cache boolean: If true, the locator will cache data loaded from relations.

public void setExcludeRedundantRelations (boolean exclude)

Sets whether or not the locator will load and use relations that can be replaced by other, more general relations. For instance, if you have two relations, one covering fields A and B, and another covering fields A, B, and C, then the first relation is treated as redundant. It can safely be removed while maintaining correctness. This decreases performance, but saves on memory consumption. Recommended for mobile applications.

Parameters
exclude boolean: If true, the locator will not load redundant relations.

public void setMemoryLimit (long limit)

Sets the memory limit in megabytes for the locator. A higher limit increases performance. Determining the right limit depends on the type of locator and its intended usage. Note, if the limit is set to a value lower than the minimum amount of required memory (depends on locator), the limit will be violated.

Parameters
limit long: The memory limit in megabytes.

public void setPreloadDictionaries (boolean preload)

Set whether or not the locator will preload dictionaries into memory. This increases performance, but also increases memory consumption. Not recommended for mobile applications with tight memory constraints.

Parameters
preload boolean: If true, the locator will preload dictionaries into memory.