SGF-30
make close and destroy exclusive
This commit is contained in:
@@ -136,7 +136,7 @@ public class RegionFactoryBean<K, V> extends RegionLookupFactoryBean<K, V> imple
|
||||
}
|
||||
}
|
||||
}
|
||||
if (destroy) {
|
||||
else if (destroy) {
|
||||
region.destroyRegion();
|
||||
}
|
||||
}
|
||||
@@ -146,21 +146,33 @@ public class RegionFactoryBean<K, V> extends RegionLookupFactoryBean<K, V> imple
|
||||
/**
|
||||
* Indicates whether the region referred by this factory bean,
|
||||
* will be destroyed on shutdown (default false).
|
||||
* Note: destroy and close are mutually exclusive. Enabling one will automatically disable the other.
|
||||
*
|
||||
* @param destroy whether or not to destroy the region
|
||||
*
|
||||
* @see #setClose(boolean)
|
||||
*/
|
||||
public void setDestroy(boolean destroy) {
|
||||
this.destroy = destroy;
|
||||
|
||||
if (destroy) {
|
||||
close = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether the region referred by this factory bean,
|
||||
* will be closed on shutdown (default true).
|
||||
* Note: destroy and close are mutually exclusive. Enabling one will automatically disable the other.
|
||||
*
|
||||
* @param close whether to close or not the region
|
||||
* @see #setDestroy(boolean)
|
||||
*/
|
||||
public void setClose(boolean close) {
|
||||
this.close = close;
|
||||
if (close) {
|
||||
destroy = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -210,6 +210,8 @@ After the destroy, this region object can not be used any more and any attempt t
|
||||
RegionDestroyedException.
|
||||
|
||||
Default is false, meaning that regions are not destroyed.
|
||||
|
||||
Note: destroy and close are mutually exclusive. Enabling one will automatically disable the other.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
@@ -221,7 +223,8 @@ disk files. Additionally it notifies the listeners and callbacks.
|
||||
|
||||
Default is true, meaning the regions are closed.
|
||||
|
||||
Note: Regions are automatically closed when cache closes.
|
||||
Note: Regions are automatically closed when cache closes.
|
||||
Note: destroy and close are mutually exclusive. Enabling one will automatically disable the other.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
|
||||
Reference in New Issue
Block a user