public class RegionFactory<K,V> extends Object
RegionFactory
is used to create regions
in a cache
.
Instances of this interface can be created:
shortcut
by calling
Cache.createRegionFactory(RegionShortcut)
which will initialize the factory with the
shortcut's region attributes
Cache.createRegionFactory(String)
which
will initialize the factory the named region attributes
Cache.createRegionFactory(RegionAttributes)
which will initialize the factory with the
given region attributes
Cache.createRegionFactory()
which will initialize the factory with
defaults
The final step is to produce a Region
by calling create(String)
.
Example: Create a replicate region with a CacheListener
Cache c = new CacheFactory().create(); // Create replicate region. // Add a cache listener before creating region Region r = c.createRegionFactory(REPLICATE).addCacheListener(myListener).create("replicate");
Example: Create a partition region that has redundancy
Cache c = new CacheFactory().create(); // Create replicate region. // Add a cache listener before creating region Region r = c.createRegionFactory(PARTITION_REDUNDANT).create("partition");
Modifier | Constructor and Description |
---|---|
|
RegionFactory()
Deprecated.
as of 6.5 use
Cache.createRegionFactory() instead. |
protected |
RegionFactory(org.apache.geode.internal.cache.InternalCache cache)
For internal use only.
|
protected |
RegionFactory(org.apache.geode.internal.cache.InternalCache cache,
RegionAttributes ra)
For internal use only.
|
protected |
RegionFactory(org.apache.geode.internal.cache.InternalCache cache,
RegionShortcut pra)
For internal use only.
|
protected |
RegionFactory(org.apache.geode.internal.cache.InternalCache cache,
String regionAttributesId)
For internal use only.
|
|
RegionFactory(Properties distributedSystemProperties)
Deprecated.
as of 6.5 use
CacheFactory(Properties) and
Cache.createRegionFactory() instead. |
|
RegionFactory(Properties distributedSystemProperties,
RegionAttributes<K,V> regionAttributes)
Deprecated.
as of 6.5 use
CacheFactory(Properties) and
Cache.createRegionFactory(RegionAttributes) instead. |
|
RegionFactory(Properties distributedSystemProperties,
String regionAttributesId)
Deprecated.
as of 6.5 use
CacheFactory(Properties) and
Cache.createRegionFactory(String) instead. |
|
RegionFactory(RegionAttributes<K,V> regionAttributes)
Deprecated.
as of 6.5 use
Cache.createRegionFactory(RegionAttributes) instead. |
protected |
RegionFactory(RegionFactory<K,V> regionFactory)
Constructs a RegionFactory that is a copy of an existing RegionFactory
|
|
RegionFactory(String regionAttributesId)
Deprecated.
as of 6.5 use
Cache.createRegionFactory(String) instead. |
Modifier and Type | Method and Description |
---|---|
RegionFactory<K,V> |
addAsyncEventQueueId(String asyncEventQueueId)
Adds a asyncEventQueueId to the RegionAttributes
|
RegionFactory<K,V> |
addCacheListener(CacheListener<K,V> aListener)
Adds a cache listener to the end of the list of cache listeners on this factory.
|
RegionFactory<K,V> |
addGatewaySenderId(String gatewaySenderId)
Adds a gatewaySenderId to the RegionAttributes
|
Region<K,V> |
create(String name)
Creates a region with the given name in this factory's
Cache using the configuration
contained in this factory. |
Region<K,V> |
createSubregion(Region<?,?> parent,
String name)
Creates a sub-region in the
Cache using the configuration contained in this
RegionFactory. |
protected org.apache.geode.internal.cache.InternalCache |
getCache()
Returns the cache used by this factory.
|
protected RegionAttributes<K,V> |
getRegionAttributes()
Returns the attributes used by this factory to create a region.
|
RegionFactory<K,V> |
initCacheListeners(CacheListener<K,V>[] newListeners)
Removes all cache listeners and then adds each listener in the specified array.
|
RegionFactory<K,V> |
setCacheLoader(CacheLoader<K,V> cacheLoader)
Sets the cache loader for the next
RegionAttributes created. |
RegionFactory<K,V> |
setCacheWriter(CacheWriter<K,V> cacheWriter)
Sets the cache writer for the next
RegionAttributes created. |
RegionFactory<K,V> |
setCloningEnabled(boolean cloningEnable)
Sets cloning on region Note: off-heap regions always behave as if cloning is enabled.
|
RegionFactory<K,V> |
setCompressor(Compressor compressor)
Set the compressor to be used by this region for compressing region entry values.
|
RegionFactory<K,V> |
setConcurrencyChecksEnabled(boolean enabled)
Enables a versioning system that detects concurrent modifications and ensures that region
contents are consistent across the distributed system.
|
RegionFactory<K,V> |
setConcurrencyLevel(int concurrencyLevel)
Sets the concurrency level tof the next
RegionAttributes created. |
RegionFactory<K,V> |
setCustomEntryIdleTimeout(CustomExpiry<K,V> custom)
Sets the custom idleTimeout for the next
RegionAttributes created. |
RegionFactory<K,V> |
setCustomEntryTimeToLive(CustomExpiry<K,V> custom)
Sets the custom timeToLive expiration method for the next
RegionAttributes created. |
RegionFactory<K,V> |
setDataPolicy(DataPolicy dataPolicy)
Sets the data policy for the next
RegionAttributes created. |
RegionFactory<K,V> |
setDiskDirs(File[] diskDirs)
Deprecated.
as of 6.5 use
DiskStoreFactory.setDiskDirs(java.io.File[]) instead |
RegionFactory<K,V> |
setDiskDirsAndSizes(File[] diskDirs,
int[] diskSizes)
Deprecated.
as of 6.5 use
DiskStoreFactory.setDiskDirsAndSizes(java.io.File[], int[]) instead |
RegionFactory<K,V> |
setDiskStoreName(String name)
Sets the DiskStore name attribute.
|
RegionFactory<K,V> |
setDiskSynchronous(boolean isSynchronous)
Sets whether or not the writing to the disk is synchronous.
|
RegionFactory<K,V> |
setDiskWriteAttributes(DiskWriteAttributes attrs)
Deprecated.
as of 6.5 use
setDiskStoreName(java.lang.String) instead |
RegionFactory<K,V> |
setEarlyAck(boolean earlyAck)
Deprecated.
As of 6.5 this setting no longer has any effect.
|
RegionFactory<K,V> |
setEnableAsyncConflation(boolean value)
Sets whether or not conflation is enabled for sending messages to async peers.
|
RegionFactory<K,V> |
setEnableSubscriptionConflation(boolean value)
Sets whether or not conflation is enabled for sending messages from a cache server to its
clients.
|
RegionFactory<K,V> |
setEntryIdleTimeout(ExpirationAttributes idleTimeout)
Sets the idleTimeout expiration attributes for region entries for the next
RegionAttributes created. |
RegionFactory<K,V> |
setEntryTimeToLive(ExpirationAttributes timeToLive)
Sets the timeToLive expiration attributes for region entries for the next
RegionAttributes created. |
RegionFactory<K,V> |
setEvictionAttributes(EvictionAttributes evictionAttributes)
Sets the eviction attributes that controls growth of the Region to be created.
|
RegionFactory<K,V> |
setIgnoreJTA(boolean flag)
Sets whether operations on this region should be controlled by JTA transactions or not
|
RegionFactory<K,V> |
setIndexMaintenanceSynchronous(boolean synchronous)
Sets how indexes on this region are kept current.
|
RegionFactory<K,V> |
setInitialCapacity(int initialCapacity)
Sets the entry initial capacity for the next
RegionAttributes created. |
RegionFactory<K,V> |
setKeyConstraint(Class<K> keyConstraint)
Sets the key constraint for the next
RegionAttributes created. |
RegionFactory<K,V> |
setLoadFactor(float loadFactor)
Sets the entry load factor for the next
RegionAttributes created. |
RegionFactory<K,V> |
setLockGrantor(boolean isLockGrantor)
Sets whether this region should become lock grantor.
|
RegionFactory<K,V> |
setMembershipAttributes(MembershipAttributes ra)
Deprecated.
this API is scheduled to be removed
|
RegionFactory<K,V> |
setMulticastEnabled(boolean value)
Sets whether distributed operations on this region should attempt to use multicast.
|
RegionFactory<K,V> |
setOffHeap(boolean offHeap)
Enables this region's usage of off-heap memory if true.
|
RegionFactory<K,V> |
setPartitionAttributes(PartitionAttributes partition)
Sets the
PartitionAttributes that describe how the region is partitioned among members
of the distributed system. |
RegionFactory<K,V> |
setPoolName(String poolName)
Sets the pool name attribute.
|
void |
setPublisher(boolean v)
Deprecated.
as of 6.5
|
RegionFactory<K,V> |
setRegionIdleTimeout(ExpirationAttributes idleTimeout)
Sets the idleTimeout expiration attributes for the region itself for the next
RegionAttributes created. |
RegionFactory<K,V> |
setRegionTimeToLive(ExpirationAttributes timeToLive)
Sets the timeToLive expiration attributes for the region itself for the next
RegionAttributes created. |
RegionFactory<K,V> |
setScope(Scope scopeType)
Sets the scope for the next
RegionAttributes created. |
RegionFactory<K,V> |
setStatisticsEnabled(boolean statisticsEnabled)
Sets whether statistics are enabled for this region and its entries.
|
RegionFactory<K,V> |
setSubscriptionAttributes(SubscriptionAttributes sa)
Sets the kind of interest this region has in events occuring in other caches that define the
region by the same name.
|
RegionFactory<K,V> |
setValueConstraint(Class<V> valueConstraint)
Sets the value constraint for the next
RegionAttributes created. |
protected RegionFactory(org.apache.geode.internal.cache.InternalCache cache)
cache
- the cacheprotected RegionFactory(org.apache.geode.internal.cache.InternalCache cache, RegionShortcut pra)
cache
- the cachepra
- the RegionShortcut
with which to initialize the Regionprotected RegionFactory(org.apache.geode.internal.cache.InternalCache cache, RegionAttributes ra)
cache
- the cachera
- the RegionAttributes
with which to initialize the Region@VisibleForTesting protected RegionFactory(RegionFactory<K,V> regionFactory)
regionFactory
- the RegionFactory to copyprotected RegionFactory(org.apache.geode.internal.cache.InternalCache cache, String regionAttributesId)
cache
- the cacheregionAttributesId
- the id of the RegionAttributes
with which to initialize the
Region@Deprecated public RegionFactory() throws CacheWriterException, RegionExistsException, TimeoutException
Cache.createRegionFactory()
instead.CacheException
- if unable to connect the DistributedSystem or create a CacheCacheWriterException
RegionExistsException
TimeoutException
@Deprecated public RegionFactory(RegionAttributes<K,V> regionAttributes) throws CacheWriterException, RegionExistsException, TimeoutException
Cache.createRegionFactory(RegionAttributes)
instead.regionAttributes
- the RegionAttributes
with which to initialize the RegionCacheException
- if unable to connect the DistributedSystem or create a CacheCacheWriterException
RegionExistsException
TimeoutException
@Deprecated public RegionFactory(String regionAttributesId) throws CacheWriterException, RegionExistsException, TimeoutException
Cache.createRegionFactory(String)
instead.regionAttributesId
- that identifies a set of RegionAttributes in the cache-xml file.IllegalArgumentException
- if there are no attributes associated with the idCacheException
- if unable to connect the DistributedSystem or create a CacheCacheWriterException
RegionExistsException
TimeoutException
GemFireCache.getRegionAttributes(java.lang.String)
@Deprecated public RegionFactory(Properties distributedSystemProperties) throws CacheWriterException, RegionExistsException, TimeoutException
CacheFactory(Properties)
and
Cache.createRegionFactory()
instead.distributedSystemProperties
- an instance of Properties containing
DistributedSystem
configurationCacheException
- if unable to connect the DistributedSystem or create a CacheCacheWriterException
RegionExistsException
TimeoutException
@Deprecated public RegionFactory(Properties distributedSystemProperties, RegionAttributes<K,V> regionAttributes) throws CacheWriterException, RegionExistsException, TimeoutException
CacheFactory(Properties)
and
Cache.createRegionFactory(RegionAttributes)
instead.distributedSystemProperties
- properties used to either find or create a
DistributedSystem.regionAttributes
- the initial Region configuration for this RegionFactory.CacheException
- if unable to connect the DistributedSystem or create a CacheCacheWriterException
RegionExistsException
TimeoutException
@Deprecated public RegionFactory(Properties distributedSystemProperties, String regionAttributesId) throws CacheWriterException, RegionExistsException, TimeoutException
CacheFactory(Properties)
and
Cache.createRegionFactory(String)
instead.distributedSystemProperties
- properties used to either find or create a
DistributedSystem.regionAttributesId
- the identifier for set of RegionAttributes in the cache.xml file used
as the initial Region configuration for this RegionFactory.IllegalArgumentException
- if there are no attributes associated with the idCacheException
- if unable to connect the DistributedSystem or create a CacheCacheWriterException
RegionExistsException
TimeoutException
protected org.apache.geode.internal.cache.InternalCache getCache()
protected RegionAttributes<K,V> getRegionAttributes()
public RegionFactory<K,V> setCacheLoader(CacheLoader<K,V> cacheLoader)
RegionAttributes
created.cacheLoader
- the cache loader or null if no loaderAttributesFactory.setCacheLoader(org.apache.geode.cache.CacheLoader<K, V>)
public RegionFactory<K,V> setCacheWriter(CacheWriter<K,V> cacheWriter)
RegionAttributes
created.cacheWriter
- the cache writer or null if no cache writerAttributesFactory.setCacheWriter(org.apache.geode.cache.CacheWriter<K, V>)
public RegionFactory<K,V> addCacheListener(CacheListener<K,V> aListener)
aListener
- the cache listener to addIllegalArgumentException
- if aListener
is nullAttributesFactory.addCacheListener(org.apache.geode.cache.CacheListener<K, V>)
public RegionFactory<K,V> initCacheListeners(CacheListener<K,V>[] newListeners)
RegionAttributes
created.newListeners
- a possibly null or empty array of listeners to add to this factory.IllegalArgumentException
- if the newListeners
array has a null elementAttributesFactory.initCacheListeners(org.apache.geode.cache.CacheListener<K, V>[])
public RegionFactory<K,V> setEvictionAttributes(EvictionAttributes evictionAttributes)
evictionAttributes
- for the Region to createpublic RegionFactory<K,V> setEntryIdleTimeout(ExpirationAttributes idleTimeout)
RegionAttributes
created. Note that the XML element that corresponds to this method
"entry-idle-time", does not include "out" in its name.idleTimeout
- the idleTimeout ExpirationAttributes for entries in this regionIllegalArgumentException
- if idleTimeout is nullAttributesFactory.setEntryIdleTimeout(org.apache.geode.cache.ExpirationAttributes)
public RegionFactory<K,V> setCustomEntryIdleTimeout(CustomExpiry<K,V> custom)
RegionAttributes
created.custom
- the custom methodAttributesFactory.setCustomEntryIdleTimeout(CustomExpiry)
public RegionFactory<K,V> setEntryTimeToLive(ExpirationAttributes timeToLive)
RegionAttributes
created.timeToLive
- the timeToLive ExpirationAttributes for entries in this regionIllegalArgumentException
- if timeToLive is nullAttributesFactory.setEntryTimeToLive(org.apache.geode.cache.ExpirationAttributes)
public RegionFactory<K,V> setCustomEntryTimeToLive(CustomExpiry<K,V> custom)
RegionAttributes
created.custom
- the custom methodAttributesFactory.setCustomEntryTimeToLive(CustomExpiry)
public RegionFactory<K,V> setRegionIdleTimeout(ExpirationAttributes idleTimeout)
RegionAttributes
created. Note that the XML element that corresponds to this method
"region-idle-time", does not include "out" in its name.idleTimeout
- the ExpirationAttributes for this region idleTimeoutIllegalArgumentException
- if idleTimeout is nullAttributesFactory.setRegionIdleTimeout(org.apache.geode.cache.ExpirationAttributes)
public RegionFactory<K,V> setRegionTimeToLive(ExpirationAttributes timeToLive)
RegionAttributes
created.timeToLive
- the ExpirationAttributes for this region timeToLiveIllegalArgumentException
- if timeToLive is nullAttributesFactory.setRegionTimeToLive(org.apache.geode.cache.ExpirationAttributes)
public RegionFactory<K,V> setScope(Scope scopeType)
RegionAttributes
created.scopeType
- the type of Scope to use for the regionIllegalArgumentException
- if scopeType is nullAttributesFactory.setScope(org.apache.geode.cache.Scope)
public RegionFactory<K,V> setDataPolicy(DataPolicy dataPolicy)
RegionAttributes
created.dataPolicy
- The type of mirroring to use for the regionIllegalArgumentException
- if dataPolicy is nullAttributesFactory.setDataPolicy(org.apache.geode.cache.DataPolicy)
@Deprecated public RegionFactory<K,V> setEarlyAck(boolean earlyAck)
earlyAck
- set to true for the acknowledgement to be sent prior to processing the updateAttributesFactory.setEarlyAck(boolean)
public RegionFactory<K,V> setMulticastEnabled(boolean value)
value
- true to enable multicastAttributesFactory.setMulticastEnabled(boolean)
public RegionFactory<K,V> setPoolName(String poolName)
If this attribute is set to null
or ""
then the connection pool is disabled
causing regions that use these attributes to be communicate with peers instead of servers.
The named connection pool must exist on the cache at the time these attributes are used to
create a region. See PoolManager.createFactory()
for how to create a connection pool.
poolName
- the name of the connection pool to use; if null
or ""
then the
connection pool attribute is disabled for regions using these attributes.IllegalStateException
- if a cache loader or cache writer has already been set.@Deprecated public void setPublisher(boolean v)
v
- whether this region should be considered a publisherpublic RegionFactory<K,V> setEnableAsyncConflation(boolean value)
value
- true to enable async conflationAttributesFactory.setEnableAsyncConflation(boolean)
public RegionFactory<K,V> setEnableSubscriptionConflation(boolean value)
value
- true to enable subscription conflationAttributesFactory.setEnableSubscriptionConflation(boolean)
public RegionFactory<K,V> setKeyConstraint(Class<K> keyConstraint)
RegionAttributes
created. Keys in the region will
be constrained to this class (or subclass). Any attempt to store a key of an incompatible type
in the region will cause a ClassCastException
to be thrown.keyConstraint
- The Class to constrain the keys to, or null if no constraintIllegalArgumentException
- if keyConstraint
is a class denoting a primitive typeAttributesFactory.setKeyConstraint(java.lang.Class<K>)
public RegionFactory<K,V> setValueConstraint(Class<V> valueConstraint)
RegionAttributes
created. Values in the region
will be constrained to this class (or subclass). Any attempt to store a value of an
incompatible type in the region will cause a ClassCastException
to be thrown.valueConstraint
- The Class to constrain the values to, or null if no constraintIllegalArgumentException
- if valueConstraint
is a class denoting a primitive
typeAttributesFactory.setValueConstraint(java.lang.Class<V>)
public RegionFactory<K,V> setInitialCapacity(int initialCapacity)
RegionAttributes
created. This value is
used in initializing the map that holds the entries.initialCapacity
- the initial capacity of the entry mapIllegalArgumentException
- if initialCapacity is negative.HashMap
,
AttributesFactory.setInitialCapacity(int)
public RegionFactory<K,V> setLoadFactor(float loadFactor)
RegionAttributes
created. This value is used in
initializing the map that holds the entries.loadFactor
- the load factor of the entry mapIllegalArgumentException
- if loadFactor is nonpositiveHashMap
,
AttributesFactory.setLoadFactor(float)
public RegionFactory<K,V> setConcurrencyLevel(int concurrencyLevel)
RegionAttributes
created. This value is used in
initializing the map that holds the entries.concurrencyLevel
- the concurrency level of the entry mapIllegalArgumentException
- if concurrencyLevel is nonpositiveAttributesFactory.setConcurrencyLevel(int)
public RegionFactory<K,V> setConcurrencyChecksEnabled(boolean enabled)
enabled
- whether concurrency checks should be enabled for the regionAttributesFactory.setConcurrencyChecksEnabled(boolean)
@Deprecated public RegionFactory<K,V> setDiskWriteAttributes(DiskWriteAttributes attrs)
setDiskStoreName(java.lang.String)
insteadDiskWriteAttributes
for this factoryattrs
- the DiskWriteAttributes
to be set for this factoryRegion.writeToDisk()
,
AttributesFactory.setDiskWriteAttributes(org.apache.geode.cache.DiskWriteAttributes)
public RegionFactory<K,V> setDiskStoreName(String name)
name
- the name of the diskstoreAttributesFactory.setDiskStoreName(java.lang.String)
public RegionFactory<K,V> setDiskSynchronous(boolean isSynchronous)
isSynchronous
- boolean if true indicates synchronous writes@Deprecated public RegionFactory<K,V> setDiskDirs(File[] diskDirs)
DiskStoreFactory.setDiskDirs(java.io.File[])
insteaddiskDirs
- the directories to which the region's data is writtenAttributesFactory.setDiskDirs(java.io.File[])
@Deprecated public RegionFactory<K,V> setDiskDirsAndSizes(File[] diskDirs, int[] diskSizes)
DiskStoreFactory.setDiskDirsAndSizes(java.io.File[], int[])
insteaddiskDirs
- the directories to which the region's data is writtendiskSizes
- the size in megabytes for each directoryIllegalArgumentException
- if length of the size array does not match to the length of
the dir arrayAttributesFactory.setDiskDirsAndSizes(java.io.File[], int[])
public RegionFactory<K,V> setPartitionAttributes(PartitionAttributes partition)
PartitionAttributes
that describe how the region is partitioned among members
of the distributed system.partition
- the PartitionAttributes
that describe how the region is partitioned
among members of the distributed systemAttributesFactory.setPartitionAttributes(org.apache.geode.cache.PartitionAttributes)
@Deprecated public RegionFactory<K,V> setMembershipAttributes(MembershipAttributes ra)
MembershipAttributes
that describe the membership roles required for reliable
access to the region.ra
- the MembershipAttributes to useAttributesFactory.setMembershipAttributes(org.apache.geode.cache.MembershipAttributes)
public RegionFactory<K,V> setIndexMaintenanceSynchronous(boolean synchronous)
synchronous
- whether indexes are maintained in a synchronized fashionpublic RegionFactory<K,V> setStatisticsEnabled(boolean statisticsEnabled)
statisticsEnabled
- whether statistics are enabledAttributesFactory.setStatisticsEnabled(boolean)
public RegionFactory<K,V> setIgnoreJTA(boolean flag)
flag
- whether operations on this region should be controlled by JTA transactionspublic RegionFactory<K,V> setLockGrantor(boolean isLockGrantor)
isLockGrantor
- whether this region should become lock grantorAttributesFactory.setLockGrantor(boolean)
public RegionFactory<K,V> setSubscriptionAttributes(SubscriptionAttributes sa)
sa
- the attributes decribing the interestAttributesFactory.setSubscriptionAttributes(SubscriptionAttributes)
public Region<K,V> create(String name) throws CacheExistsException, RegionExistsException, CacheWriterException, TimeoutException
Cache
using the configuration
contained in this factory. Validation of the provided attributes may cause exceptions to be
thrown if there are problems with the configuration data.name
- the name of the region to createLeaseExpiredException
- if lease expired on distributed lock for Scope.GLOBALRegionExistsException
- if a region, shared or unshared, is already in this cacheTimeoutException
- if timed out getting distributed lock for Scope.GLOBALCacheClosedException
- if the cache is closedIllegalStateException
- if the supplied RegionAttributes are incompatible with this
region in another cache in the distributed system (see AttributesFactory
for
compatibility rules)CacheExistsException
CacheWriterException
public Region<K,V> createSubregion(Region<?,?> parent, String name) throws RegionExistsException
Cache
using the configuration contained in this
RegionFactory. Validation of the provided attributes may cause exceptions to be thrown if there
are problems with the configuration data.parent
- the existing region that will contain the created sub-regionname
- the name of the region to createRegionExistsException
- if a region with the given name already exists in this cacheRegionDestroyedException
- if the parent region has been closed or destroyedCacheClosedException
- if the cache is closedpublic RegionFactory<K,V> setCloningEnabled(boolean cloningEnable)
cloningEnable
- whether cloning is enabled for the regionAttributesFactory.setCloningEnabled(boolean)
public RegionFactory<K,V> addGatewaySenderId(String gatewaySenderId)
gatewaySenderId
- the gatewaySenderId to addAttributesFactory.addGatewaySenderId(String)
public RegionFactory<K,V> addAsyncEventQueueId(String asyncEventQueueId)
asyncEventQueueId
- id of AsyncEventQueuepublic RegionFactory<K,V> setCompressor(Compressor compressor)
compressor
- a compressorpublic RegionFactory<K,V> setOffHeap(boolean offHeap)
offHeap
- boolean flag to enable off-heap memory