Package org.datanucleus.properties
Class FrequentlyAccessedProperties
- java.lang.Object
-
- org.datanucleus.properties.FrequentlyAccessedProperties
-
public class FrequentlyAccessedProperties extends java.lang.ObjectClass for providing faster access to properties that are rarely set but often read.
-
-
Field Summary
Fields Modifier and Type Field Description private FrequentlyAccessedPropertiesdefaultsprivate java.lang.BooleandetachAllOnCommitprivate java.lang.BooleandetachOnCloseprivate static java.util.Map<java.lang.String,java.lang.reflect.Field>fieldMapprivate java.lang.Stringlevel2CacheRetrieveModeprivate java.lang.Stringlevel2CacheStoreModeprivate java.lang.BooleanmanageRelationshipsprivate java.lang.BooleanoptimisticLockingprivate java.lang.BooleanreachabilityAtCommitprivate java.lang.BooleanserialiseRead
-
Constructor Summary
Constructors Constructor Description FrequentlyAccessedProperties()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static voidaddField(java.lang.String propertyName, java.lang.String fieldName)java.lang.BooleangetDetachAllOnCommit()java.lang.BooleangetDetachOnClose()java.lang.StringgetLevel2CacheRetrieveMode()java.lang.StringgetLevel2CacheStoreMode()java.lang.BooleangetManageRelationships()java.lang.BooleangetOptimisticLocking()java.lang.BooleangetReachabilityAtCommit()java.lang.BooleangetSerialiseRead()voidsetDefaults(FrequentlyAccessedProperties defaults)Set default properties that are read when property is not defined in this instancevoidsetProperty(java.lang.String property, java.lang.Object value)Tries to set the property value for any of the "frequent" properties.
-
-
-
Field Detail
-
fieldMap
private static java.util.Map<java.lang.String,java.lang.reflect.Field> fieldMap
-
defaults
private FrequentlyAccessedProperties defaults
-
manageRelationships
private java.lang.Boolean manageRelationships
-
reachabilityAtCommit
private java.lang.Boolean reachabilityAtCommit
-
detachOnClose
private java.lang.Boolean detachOnClose
-
detachAllOnCommit
private java.lang.Boolean detachAllOnCommit
-
level2CacheStoreMode
private java.lang.String level2CacheStoreMode
-
level2CacheRetrieveMode
private java.lang.String level2CacheRetrieveMode
-
serialiseRead
private java.lang.Boolean serialiseRead
-
optimisticLocking
private java.lang.Boolean optimisticLocking
-
-
Method Detail
-
setDefaults
public void setDefaults(FrequentlyAccessedProperties defaults)
Set default properties that are read when property is not defined in this instance- Parameters:
defaults- Default properties
-
setProperty
public void setProperty(java.lang.String property, java.lang.Object value)Tries to set the property value for any of the "frequent" properties.- Parameters:
property- prop namevalue- The value of the property
-
getManageRelationships
public java.lang.Boolean getManageRelationships()
-
getReachabilityAtCommit
public java.lang.Boolean getReachabilityAtCommit()
-
getDetachOnClose
public java.lang.Boolean getDetachOnClose()
-
getDetachAllOnCommit
public java.lang.Boolean getDetachAllOnCommit()
-
getLevel2CacheStoreMode
public java.lang.String getLevel2CacheStoreMode()
-
getLevel2CacheRetrieveMode
public java.lang.String getLevel2CacheRetrieveMode()
-
getSerialiseRead
public java.lang.Boolean getSerialiseRead()
-
getOptimisticLocking
public java.lang.Boolean getOptimisticLocking()
-
addField
private static void addField(java.lang.String propertyName, java.lang.String fieldName) throws java.lang.NoSuchFieldException, java.lang.SecurityException- Throws:
java.lang.NoSuchFieldExceptionjava.lang.SecurityException
-
-