Package org.eclipse.persistence.services
Class DevelopmentServices
- java.lang.Object
-
- org.eclipse.persistence.services.DevelopmentServices
-
- Direct Known Subclasses:
MBeanDevelopmentServices
public class DevelopmentServices extends java.lang.ObjectPurpose: Provide a dynamic interface into the EclipseLink Identity Map Manager.
Description: This class is meant to provide a framework for gaining access to configuration and statistics of the EclipseLink Cache during runtime. It will provide the basis for development of a JMX service and possibly other frameworks.
-
-
Constructor Summary
Constructors Constructor Description DevelopmentServices()Default constructorDevelopmentServices(Session session)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.persistence.internal.sessions.AbstractSessiongetSession()INTERNAL:booleangetShouldBindAllParameters()Method returns if all Parameters should be bound or notintgetStringBindingSize()Return the size of strings after which will be bound into the statementbooleangetUsesBatchWriting()This method will return if batchWriting is in use or not.booleangetUsesByteArrayBinding()Shows if Byte Array Binding is turned on or notbooleangetUsesJDBCBatchWriting()This method will return if batchWriting is in use or not.booleangetUsesNativeSQL()Shows if native SQL is being usedbooleangetUsesStreamsForBinding()This method indicates if streams are being used for bindingbooleangetUsesStringBinding()This method indicates if Strings are being boundvoidinitializeAllIdentityMaps()This method is used to clear the contents of all identity maps.voidinitializeIdentityMap(java.lang.String className)This method is used to clear the contents of a particular identity map.voidrefreshProject(java.lang.String projectFilePath)This method used to reset a project in a session.voidsetIdentityMapForClass(java.lang.String className, java.lang.String identityMapClassType, int maxSize)This method will be used to set a new type of identity map for a particular class type.voidsetShouldBindAllParameters(boolean shouldBindAllParameters)This method is used to control if All parameters should be boundvoidsetStringBindingSize(int size)Sets the size of strings after which they will be bound into the statementvoidsetUsesBatchWriting(boolean usesBatchWriting)This method is used to turn on EclipseLink Batch Writing.voidsetUsesByteArrayBinding(boolean usesByteArrayBinding)This method allows control of whether byte arrays should be bound into the statement or not.voidsetUsesJDBCBatchWriting(boolean usesJDBCBatchWriting)This method is used to turn on JDBC Batch Writing.voidsetUsesNativeSQL(boolean usesNativeSQL)This method allows the client to set if Native SQL should be used.voidsetUsesStreamsForBinding(boolean usesStreamsForBinding)This method is used to set if streams should be used for binding.voidsetUsesStringBinding(boolean usesStringBinding)Allows the client to set if String should be bound into the statement or not.voidupdateCacheSize(java.lang.String className, int newSize)This method is used to update the cache size of a particular Identity Map
-
-
-
Field Detail
-
session
protected Session session
stores access to the session object that we are controlling
-
-
Constructor Detail
-
DevelopmentServices
public DevelopmentServices()
Default constructor
-
DevelopmentServices
public DevelopmentServices(Session session)
Constructor- Parameters:
session- the session for these services
-
-
Method Detail
-
initializeIdentityMap
public void initializeIdentityMap(java.lang.String className) throws java.lang.ClassNotFoundExceptionThis method is used to clear the contents of a particular identity map. Users should be aware that if any of these objects are in use when this action is completed they will lose object identity.- Parameters:
className- the fully qualified name of the class for which the identity map should be cleared.- Throws:
java.lang.ClassNotFoundException- thrown then the IdenityMap for that class name could not be found
-
initializeAllIdentityMaps
public void initializeAllIdentityMaps()
This method is used to clear the contents of all identity maps. Users should be aware that if any of these objects are in use when this action is completed they will lose object identity.
-
setIdentityMapForClass
public void setIdentityMapForClass(java.lang.String className, java.lang.String identityMapClassType, int maxSize) throws java.lang.ClassNotFoundExceptionThis method will be used to set a new type of identity map for a particular class type. If objects of that class type are in use loss of object identity will result. For prevention client may wish to initialize all identity maps first.- Parameters:
className- the fully qualified className to set the identity map for.identityMapClassType- the fully qualified class name of the new identity map type.maxSize- the maximum size to be specified for the new identity map.- Throws:
java.lang.ClassNotFoundException- thrown then the IdenityMap for that class name could not be found
-
refreshProject
public void refreshProject(java.lang.String projectFilePath)
This method used to reset a project in a session. All connected clients will get errors. project must be of the xml type. This attribute will not be stored on a save.- Parameters:
projectFilePath- the filename of the project xml file to build the new project from.
-
updateCacheSize
public void updateCacheSize(java.lang.String className, int newSize) throws java.lang.ClassNotFoundExceptionThis method is used to update the cache size of a particular Identity Map- Parameters:
className- the name of the class for which to update the identity map size.- Throws:
java.lang.ClassNotFoundException- thrown then the IdenityMap for that class name could not be found
-
setShouldBindAllParameters
public void setShouldBindAllParameters(boolean shouldBindAllParameters)
This method is used to control if All parameters should be bound
-
getShouldBindAllParameters
public boolean getShouldBindAllParameters()
Method returns if all Parameters should be bound or not
-
setStringBindingSize
public void setStringBindingSize(int size)
Sets the size of strings after which they will be bound into the statement
-
getStringBindingSize
public int getStringBindingSize()
Return the size of strings after which will be bound into the statement
-
setUsesBatchWriting
public void setUsesBatchWriting(boolean usesBatchWriting)
This method is used to turn on EclipseLink Batch Writing. Please note that toggling this setting while a transaction is open may result in unordered sql statements or loss of statements. Also please note that EclipseLink Batch Writing may not work with all JDBC Drivers
-
getUsesBatchWriting
public boolean getUsesBatchWriting()
This method will return if batchWriting is in use or not.
-
setUsesJDBCBatchWriting
public void setUsesJDBCBatchWriting(boolean usesJDBCBatchWriting)
This method is used to turn on JDBC Batch Writing. Please note that toggling this setting while a transaction is open may result in mis-ordered sql statements or loss of statements.
-
getUsesJDBCBatchWriting
public boolean getUsesJDBCBatchWriting()
This method will return if batchWriting is in use or not.
-
setUsesByteArrayBinding
public void setUsesByteArrayBinding(boolean usesByteArrayBinding)
This method allows control of whether byte arrays should be bound into the statement or not. Toggling this attribute while an SQL statement is being built, or if you are caching statements, will result in errors.
-
getUsesByteArrayBinding
public boolean getUsesByteArrayBinding()
Shows if Byte Array Binding is turned on or not
-
setUsesNativeSQL
public void setUsesNativeSQL(boolean usesNativeSQL)
This method allows the client to set if Native SQL should be used.
-
getUsesNativeSQL
public boolean getUsesNativeSQL()
Shows if native SQL is being used
-
setUsesStreamsForBinding
public void setUsesStreamsForBinding(boolean usesStreamsForBinding)
This method is used to set if streams should be used for binding. Please note that toggling this attribute while a statement is being built will result in errors.
-
getUsesStreamsForBinding
public boolean getUsesStreamsForBinding()
This method indicates if streams are being used for binding
-
setUsesStringBinding
public void setUsesStringBinding(boolean usesStringBinding)
Allows the client to set if String should be bound into the statement or not. Please note that toggling this attribute while a statement is being built, or if statement caching is being used, will result in errors.
-
getUsesStringBinding
public boolean getUsesStringBinding()
This method indicates if Strings are being bound
-
getSession
protected org.eclipse.persistence.internal.sessions.AbstractSession getSession()
INTERNAL:
-
-