Package org.datanucleus.properties
Class FrequentlyAccessedProperties
- java.lang.Object
-
- org.datanucleus.properties.FrequentlyAccessedProperties
-
public class FrequentlyAccessedProperties extends java.lang.Object
Class for providing faster access to properties that are rarely set but often read.
-
-
Field Summary
Fields Modifier and Type Field Description private FrequentlyAccessedProperties
defaults
private java.lang.Boolean
detachAllOnCommit
private java.lang.Boolean
detachOnClose
private static java.util.Map<java.lang.String,java.lang.reflect.Field>
fieldMap
private java.lang.String
level2CacheRetrieveMode
private java.lang.String
level2CacheStoreMode
private java.lang.Boolean
manageRelationships
private java.lang.Boolean
optimisticLocking
private java.lang.Boolean
reachabilityAtCommit
private java.lang.Boolean
serialiseRead
-
Constructor Summary
Constructors Constructor Description FrequentlyAccessedProperties()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static void
addField(java.lang.String propertyName, java.lang.String fieldName)
java.lang.Boolean
getDetachAllOnCommit()
java.lang.Boolean
getDetachOnClose()
java.lang.String
getLevel2CacheRetrieveMode()
java.lang.String
getLevel2CacheStoreMode()
java.lang.Boolean
getManageRelationships()
java.lang.Boolean
getOptimisticLocking()
java.lang.Boolean
getReachabilityAtCommit()
java.lang.Boolean
getSerialiseRead()
void
setDefaults(FrequentlyAccessedProperties defaults)
Set default properties that are read when property is not defined in this instancevoid
setProperty(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.NoSuchFieldException
java.lang.SecurityException
-
-