Top Description Fields Constructors Methods
org.eclipse.persistence.services

public Class DevelopmentServices

extends Object
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.services.mbean.MBeanDevelopmentServices
Imports
java.security.AccessController, .PrivilegedActionException, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.internal.helper.ClassConstants, org.eclipse.persistence.internal.identitymaps.IdentityMap, org.eclipse.persistence.internal.security.PrivilegedAccessHelper, .PrivilegedClassForName, org.eclipse.persistence.internal.sessions.AbstractSession, .DatabaseSessionImpl, org.eclipse.persistence.sessions.DatabaseLogin, .Session, org.eclipse.persistence.sessions.factories.XMLProjectReader

Purpose: 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.

Field Summary

Modifier and TypeField and Description
protected Session
session

stores access to the session object that we are controlling

Constructor Summary

AccessConstructor and Description
public
DevelopmentServices()

Default constructor

public
DevelopmentServices(Session
the session for these services
session
)

Constructor

Method Summary

Modifier and TypeMethod and Description
protected AbstractSession
getSession()

INTERNAL:

public boolean
getShouldBindAllParameters()

Method returns if all Parameters should be bound or not

public int
getStringBindingSize()

Return the size of strings after which will be bound into the statement

public boolean
getUsesBatchWriting()

This method will return if batchWriting is in use or not.

public boolean
getUsesByteArrayBinding()

Shows if Byte Array Binding is turned on or not

public boolean
getUsesJDBCBatchWriting()

This method will return if batchWriting is in use or not.

public boolean
getUsesNativeSQL()

Shows if native SQL is being used

public boolean
getUsesStreamsForBinding()

This method indicates if streams are being used for binding

public boolean
getUsesStringBinding()

This method indicates if Strings are being bound

public void
initializeAllIdentityMaps()

This method is used to clear the contents of all identity maps.

public void
initializeIdentityMap(String
the fully qualified name of the class for which the identity map should be cleared.
className
)

This method is used to clear the contents of a particular identity map.

public void
refreshProject(String
the filename of the project xml file to build the new project from.
projectFilePath
)

This method used to reset a project in a session.

public void
setIdentityMapForClass(String
the fully qualified className to set the identity map for.
className
,
String
the fully qualified class name of the new identity map type.
identityMapClassType
,
int
the maximum size to be specified for the new identity map.
maxSize
)

This method will be used to set a new type of identity map for a particular class type.

public void
setShouldBindAllParameters(boolean shouldBindAllParameters)

This method is used to control if All parameters should be bound

public void
setStringBindingSize(int size)

Sets the size of strings after which they will be bound into the statement

public void
setUsesBatchWriting(boolean usesBatchWriting)

This method is used to turn on EclipseLink Batch Writing.

public void
setUsesByteArrayBinding(boolean usesByteArrayBinding)

This method allows control of whether byte arrays should be bound into the statement or not.

public void
setUsesJDBCBatchWriting(boolean usesJDBCBatchWriting)

This method is used to turn on JDBC Batch Writing.

public void
setUsesNativeSQL(boolean usesNativeSQL)

This method allows the client to set if Native SQL should be used.

public void
setUsesStreamsForBinding(boolean usesStreamsForBinding)

This method is used to set if streams should be used for binding.

public void
setUsesStringBinding(boolean usesStringBinding)

Allows the client to set if String should be bound into the statement or not.

public void
updateCacheSize(String
the name of the class for which to update the identity map size.
className
,
int newSize)

This method is used to update the cache size of a particular Identity Map

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

sessionback to summary
protected Session session

stores access to the session object that we are controlling

Constructor Detail

DevelopmentServicesback to summary
public DevelopmentServices()

Default constructor

DevelopmentServicesback to summary
public DevelopmentServices(Session session)

Constructor

Parameters
session:Session

the session for these services

Method Detail

getSessionback to summary
protected AbstractSession getSession()

INTERNAL:

getShouldBindAllParametersback to summary
public boolean getShouldBindAllParameters()

Method returns if all Parameters should be bound or not

getStringBindingSizeback to summary
public int getStringBindingSize()

Return the size of strings after which will be bound into the statement

getUsesBatchWritingback to summary
public boolean getUsesBatchWriting()

This method will return if batchWriting is in use or not.

getUsesByteArrayBindingback to summary
public boolean getUsesByteArrayBinding()

Shows if Byte Array Binding is turned on or not

getUsesJDBCBatchWritingback to summary
public boolean getUsesJDBCBatchWriting()

This method will return if batchWriting is in use or not.

getUsesNativeSQLback to summary
public boolean getUsesNativeSQL()

Shows if native SQL is being used

getUsesStreamsForBindingback to summary
public boolean getUsesStreamsForBinding()

This method indicates if streams are being used for binding

getUsesStringBindingback to summary
public boolean getUsesStringBinding()

This method indicates if Strings are being bound

initializeAllIdentityMapsback to summary
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.

initializeIdentityMapback to summary
public void initializeIdentityMap(String className) throws ClassNotFoundException

This 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:String

the fully qualified name of the class for which the identity map should be cleared.

Exceptions
ClassNotFoundException:
thrown then the IdenityMap for that class name could not be found
refreshProjectback to summary
public void refreshProject(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:String

the filename of the project xml file to build the new project from.

setIdentityMapForClassback to summary
public void setIdentityMapForClass(String className, String identityMapClassType, int maxSize) throws ClassNotFoundException

This 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:String

the fully qualified className to set the identity map for.

identityMapClassType:String

the fully qualified class name of the new identity map type.

maxSize:int

the maximum size to be specified for the new identity map.

Exceptions
ClassNotFoundException:
thrown then the IdenityMap for that class name could not be found
setShouldBindAllParametersback to summary
public void setShouldBindAllParameters(boolean shouldBindAllParameters)

This method is used to control if All parameters should be bound

setStringBindingSizeback to summary
public void setStringBindingSize(int size)

Sets the size of strings after which they will be bound into the statement

setUsesBatchWritingback to summary
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

setUsesByteArrayBindingback to summary
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.

setUsesJDBCBatchWritingback to summary
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.

setUsesNativeSQLback to summary
public void setUsesNativeSQL(boolean usesNativeSQL)

This method allows the client to set if Native SQL should be used.

setUsesStreamsForBindingback to summary
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.

setUsesStringBindingback to summary
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.

updateCacheSizeback to summary
public void updateCacheSize(String className, int newSize) throws ClassNotFoundException

This method is used to update the cache size of a particular Identity Map

Parameters
className:String

the name of the class for which to update the identity map size.

Exceptions
ClassNotFoundException:
thrown then the IdenityMap for that class name could not be found