Java Doc for Broker.java in  » Database-ORM » openjpa » org » apache » openjpa » kernel » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database ORM » openjpa » org.apache.openjpa.kernel 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.openjpa.kernel.Broker

All known Subclasses:   org.apache.openjpa.kernel.DelegatingBroker,  org.apache.openjpa.kernel.BrokerImpl,
Broker
public interface Broker extends Synchronization,Closeable,StoreContext,ConnectionRetainModes,DetachState,LockLevels,RestoreState,AutoClear,AutoDetach,CallbackModes(Code)
The broker is the primary interface into the OpenJPA runtime. Each broker maintains an independent object cache and an independent transactional context.
since:
   0.4.0
author:
   Abe White




Method Summary
public  voidaddLifecycleListener(Object listener, Class[] classes)
     Register a listener for lifecycle-related events on the specified classes.
public  voidaddTransactionListener(Object listener)
     Register a listener for transaction-related events.
public  voidassertActiveTransaction()
     Throw an exception if there is no active transaction.
public  voidassertNontransactionalRead()
     Throw an exception if there is no transaction active and nontransactional reading is not enabled.
public  voidassertOpen()
     Throw an exception if this broker has been closed.
public  voidassertWriteOperation()
     Throw an exception if a write operation is not permitted (there is no active transaction and nontransactional writing is not enabled).
public  Objectattach(Object pc, boolean copyNew, OpCallbacks call)
     Import the specified detached object into the broker.
public  Object[]attachAll(Collection objs, boolean copyNew, OpCallbacks call)
     Import the specified objects into the broker.
public  voidbegin()
     Begin a transaction.
public  booleanbeginOperation(boolean syncTrans)
     Begin a logical operation.
public  booleancancelAll()
     Cancel all pending data store statements.
public  voidclose()
     Close the broker.
public  voidcommit()
     Commit the current transaction.
public  voidcommitAndResume()
     Issue a commit and then start a new transaction.
public  voiddelete(Object pc, OpCallbacks call)
     Delete the given object.
public  voiddeleteAll(Collection objs, OpCallbacks call)
     Delete the given objects.
public  Objectdetach(Object pc, OpCallbacks call)
     Detach the specified object from the broker.
public  voiddetachAll(OpCallbacks call)
     Detach all objects in place.
public  voiddetachAll(OpCallbacks call, boolean flush)
     Detach all objects in place, with the option of performing a flush before doing the detachment.
public  Object[]detachAll(Collection objs, OpCallbacks call)
     Detach the specified objects from the broker.
public  voiddirtyType(Class cls)
     Mark the given class as dirty within the current transaction.
public  booleanendOperation()
     End a logical operation.
public  voidevict(Object pc, OpCallbacks call)
     Evict the given object.
public  voidevictAll(Collection objs, OpCallbacks call)
     Evict the given objects.
public  voidevictAll(OpCallbacks call)
     Evict all clean objects.
public  voidevictAll(Extent extent, OpCallbacks call)
     Evict all persistent-clean and persistent-nontransactional instances in the given Extent .
public  voidflush()
     Flush all transactional instances to the data store.
public  intgetAutoClear()
     Whether objects clear when entering transactions.
public  intgetAutoDetach()
     Bit flags marked in AutoDetach which indicate when persistent managed objects should be automatically detached in-place.
public  BrokerFactorygetBrokerFactory()
     Return the factory that produced this broker.
public  intgetConnectionRetainMode()
     Return the connection retain mode for this broker.
public  booleangetEvictFromDataCache()
     Whether to also evict an object from the store cache when it is evicted through this broker.
public  SeqgetIdentitySequence(ClassMetaData meta)
     Returns a Seq for the datastore identity values of the specified persistent class, or null if the class' identity cannot be represented as a sequence.
public  booleangetIgnoreChanges()
     Whether to take into account changes in the transaction when executing a query or iterating an extent.
public  InverseManagergetInverseManager()
     Return the inverse manager in use.
public  LifecycleEventManagergetLifecycleEventManager()
     Return the lifecycle event manager associated with the broker.
public  intgetLifecycleListenerCallbackMode()
     The callback mode for handling exceptions from lifecycle event listeners.
public  ManagedRuntimegetManagedRuntime()
     Return the managed runtime in use.
public  booleangetMultithreaded()
     Whether the broker or its managed instances are used in a multithreaded environment.
public  booleangetNontransactionalRead()
     Whether to allow nontransactional access to persistent state.
public  booleangetNontransactionalWrite()
     Whether to allow nontransactional changes to persistent state.
public  booleangetOptimistic()
     Whether to use optimistic transactional semantics.
public  intgetRestoreState()
     Whether to restore an object's original state on rollback.
public  booleangetRetainState()
     Whether objects retain their persistent state on transaction commit.
public  ThrowablegetRollbackCause()
     Returns the Throwable that caused the transaction to be marked for rollback.
public  booleangetRollbackOnly()
     Return whether the current transaction has been marked for rollback.
public  booleangetSyncWithManagedTransactions()
     Whether to check for a global transaction upon every managed, non-transactional operation.
public  intgetTransactionListenerCallbackMode()
     The callback mode for handling exceptions from transaction event listeners.
public  ObjectgetUserObject(Object key)
     Get the value for the specified key from the map of user objects.
public  SeqgetValueSequence(FieldMetaData fmd)
     Returns a Seq for the generated values of the specified field, or null if the field is not generated.
public  booleanisCloseInvoked()
     Whether Broker.close has been invoked, though the broker might remain open until the current managed transaction completes.
public  booleanisClosed()
     Whether the broker is closed.
public  booleanisDetached(Object obj)
     Returns true if obj is a detached object (one that can be reattached to a Broker via a call to Broker.attach ); otherwise returns false.
public  booleanisDetachedNew()
     Whether to treat relations to detached instances during persist operations as new or as pseudo-hollow instances.
public  voidlock(Object pc, int level, int timeout, OpCallbacks call)
     Ensure that the given instance is locked at the given lock level.
public  voidlock(Object pc, OpCallbacks call)
     Ensure that the given instance is locked at the current lock level, as set in the FetchConfiguration for the broker.
public  voidlockAll(Collection objs, int level, int timeout, OpCallbacks call)
     Ensure that the given instances are locked at the given lock level.
public  voidlockAll(Collection objs, OpCallbacks call)
     Ensure that the given instances are locked at the current lock level, as set in the FetchConfiguration for the broker.
public  ExtentnewExtent(Class cls, boolean subs)
     Return an extent of the given class, optionally including subclasses.
public  ObjectnewInstance(Class cls)
     Create a new instance of type cls.
public  QuerynewQuery(String language, Class cls, Object query)
     Create a new query from the given data, with the given candidate class and language.
public  QuerynewQuery(String language, Object query)
     Create a new query in the given language.
public  voidpersist(Object obj, OpCallbacks call)
     Persist the given object.
public  OpenJPAStateManagerpersist(Object pc, Object id, OpCallbacks call)
     Make the given instance persistent.
public  voidpersistAll(Collection objs, OpCallbacks call)
     Persist the given objects.
public  voidpreFlush()
     Run pre-flush actions on transactional objects, including persistence-by-reachability, inverse relationship management, deletion of dependent instances, and instance callbacks.
public  ObjectputUserObject(Object key, Object val)
     Put the specified key-value pair into the map of user objects.
public  voidrefresh(Object pc, OpCallbacks call)
     Refresh the state of the given object.
public  voidrefreshAll(Collection objs, OpCallbacks call)
     Refresh the state of the given objects.
public  voidrelease(Object pc, OpCallbacks call)
     Release the given object from management.
public  voidreleaseAll(Collection objs, OpCallbacks call)
     Release the given objects from management.
public  voidreleaseSavepoint()
     Release the last set savepoint and any resources associated with it.
public  voidreleaseSavepoint(String name)
     Release the savepoint and any resources associated with it.
public  voidremoveLifecycleListener(Object listener)
     Remove a listener for lifecycle-related events.
public  voidremoveTransactionListener(Object listener)
     Remove a listener for transaction-related events.
public  voidrollback()
     Rollback the current transaction.
public  voidrollbackAndResume()
     Issue a rollback and then start a new transaction.
public  voidrollbackToSavepoint()
     Rollback the current transaction to the last savepoint.
public  voidrollbackToSavepoint(String name)
     Rollback the current transaction to the given savepoint name.
public  voidsetAutoClear(int clear)
     Whether objects clear when entering transactions.
public  voidsetAutoDetach(int flags)
     Bit flags marked in AutoDetach which indicate when persistent managed objects should be automatically detached in-place.
public  voidsetAutoDetach(int flag, boolean on)
     Bit flags marked in AutoDetach which indicate when persistent managed objects should be automatically detached in-place.
public  voidsetDetachedNew(boolean isNew)
     Whether to treat relations to detached instances as new.
public  voidsetEvictFromDataCache(boolean evict)
     Whether to also evict an object from the store cache when it is evicted through this broker.
public  voidsetIgnoreChanges(boolean ignore)
     Whether to take into account changes in the transaction when executing a query or iterating an extent.
public  voidsetImplicitBehavior(OpCallbacks call, RuntimeExceptionTranslator ex)
     Set the broker's behavior for implicit actions such as flushing, automatic detachment, and exceptions thrown by managed instances outside a broker operation.
public  voidsetLifecycleListenerCallbackMode(int mode)
     The callback mode for handling exceptions from lifecycle event listeners.
public  voidsetMultithreaded(boolean multi)
     Whether the broker or its managed instances are used in a multithreaded environment.
public  voidsetNontransactionalRead(boolean read)
     Whether to allow nontransactional access to persistent state.
public  voidsetNontransactionalWrite(boolean write)
     Whether to allow nontransactional changes to persistent state.
public  voidsetOptimistic(boolean opt)
     Whether to use optimistic transactional semantics.
public  voidsetRestoreState(int restore)
     Whether to restore an object's original state on rollback.
public  voidsetRetainState(boolean retain)
     Whether objects retain their persistent state on transaction commit.
public  voidsetRollbackOnly()
     Mark the current transaction for rollback.
public  voidsetRollbackOnly(Throwable cause)
     Mark the current transaction for rollback with the specified cause of the rollback.
public  voidsetSavepoint(String name)
     Set a transactional savepoint where operations after this savepoint will be rolled back.
public  voidsetSyncWithManagedTransactions(boolean resync)
     Whether to check for a global transaction upon every managed, non-transactional operation.
public  voidsetTransactionListenerCallbackMode(int mode)
     The callback mode for handling exceptions from transaction event listeners.
public  booleansyncWithManagedTransaction()
     Attempt to synchronize with a current managed transaction, returning true if successful, false if no managed transaction is active.
public  voidvalidateChanges()
     Validate the changes made in this transaction, reporting any optimistic violations, constraint violations, etc.



Method Detail
addLifecycleListener
public void addLifecycleListener(Object listener, Class[] classes)(Code)
Register a listener for lifecycle-related events on the specified classes. If the classes are null, all events will be propagated to the listener.
since:
   0.3.3



addTransactionListener
public void addTransactionListener(Object listener)(Code)
Register a listener for transaction-related events.
since:
   0.2.5



assertActiveTransaction
public void assertActiveTransaction()(Code)
Throw an exception if there is no active transaction.



assertNontransactionalRead
public void assertNontransactionalRead()(Code)
Throw an exception if there is no transaction active and nontransactional reading is not enabled.



assertOpen
public void assertOpen()(Code)
Throw an exception if this broker has been closed.



assertWriteOperation
public void assertWriteOperation()(Code)
Throw an exception if a write operation is not permitted (there is no active transaction and nontransactional writing is not enabled).



attach
public Object attach(Object pc, boolean copyNew, OpCallbacks call)(Code)
Import the specified detached object into the broker.
Parameters:
  pc - instance to import the re-attached instance
Parameters:
  copyNew - whether to copy new instances



attachAll
public Object[] attachAll(Collection objs, boolean copyNew, OpCallbacks call)(Code)
Import the specified objects into the broker. Instances that were previously detached from this or another broker will have their changed merged into the persistent instances. Instances that are new will be persisted as new instances.
Parameters:
  objs - array of instances to import the re-attached instances
Parameters:
  copyNew - whether to copy new instances



begin
public void begin()(Code)
Begin a transaction.



beginOperation
public boolean beginOperation(boolean syncTrans)(Code)
Begin a logical operation. This indicates to the broker the granularity of an operation which may require pre/post operation side-effects, such as non-tx detach. Will lock the broker until the Broker.endOperation is called.
Parameters:
  syncTrans - whether instances may be loaded/modified duringthis operation requiring a re-check of global tx whether this is the outermost operation on the stack



cancelAll
public boolean cancelAll()(Code)
Cancel all pending data store statements. If statements are cancelled while a flush is in progress, the transaction rollback only flag will be set. true if any statements were cancelled, false otherwise
since:
   0.3.1



close
public void close()(Code)
Close the broker.



commit
public void commit()(Code)
Commit the current transaction.



commitAndResume
public void commitAndResume()(Code)
Issue a commit and then start a new transaction. This is identical to:
 broker.commit (); broker.begin ();
 
except that the broker's internal atomic lock is utilized, so this method can be safely executed from multiple threads.
See Also:   Broker.commit()
See Also:   Broker.begin()
since:
   0.2.4



delete
public void delete(Object pc, OpCallbacks call)(Code)
Delete the given object.



deleteAll
public void deleteAll(Collection objs, OpCallbacks call)(Code)
Delete the given objects.



detach
public Object detach(Object pc, OpCallbacks call)(Code)
Detach the specified object from the broker.
Parameters:
  pc - the instance to detach the detached instance



detachAll
public void detachAll(OpCallbacks call)(Code)
Detach all objects in place. A flush will be performed before detaching the entities.



detachAll
public void detachAll(OpCallbacks call, boolean flush)(Code)
Detach all objects in place, with the option of performing a flush before doing the detachment.
Parameters:
  call - Persistence operation callbacks
Parameters:
  flush - boolean value to indicate whether to perform aflush before detaching the entities (true, do the flush;false, don't do the flush)



detachAll
public Object[] detachAll(Collection objs, OpCallbacks call)(Code)
Detach the specified objects from the broker. The objects returned can be manipulated and re-attached with Broker.attachAll . The detached instances will be unmanaged copies of the specified parameters, and are suitable for serialization and manipulation outside of a OpenJPA environment. When detaching instances, only fields in the current FetchConfiguration will be traversed. Thus, to detach a graph of objects, relations to other persistent instances must either be in the default-fetch-group, or in the current custom FetchConfiguration .
Parameters:
  objs - the instances to detach the detached instances



dirtyType
public void dirtyType(Class cls)(Code)
Mark the given class as dirty within the current transaction.
since:
   0.3.0



endOperation
public boolean endOperation()(Code)
End a logical operation. This indicates to the broker the granularity of an operation which may require pre/post operation side-effects, such as non-tx detach. Unlocks the given broker. whether this is the outermost operation on the stack



evict
public void evict(Object pc, OpCallbacks call)(Code)
Evict the given object.



evictAll
public void evictAll(Collection objs, OpCallbacks call)(Code)
Evict the given objects.



evictAll
public void evictAll(OpCallbacks call)(Code)
Evict all clean objects.



evictAll
public void evictAll(Extent extent, OpCallbacks call)(Code)
Evict all persistent-clean and persistent-nontransactional instances in the given Extent .



flush
public void flush()(Code)
Flush all transactional instances to the data store. This method may set the rollback only flag on the current transaction if it encounters an error.
since:
   0.2.5



getAutoClear
public int getAutoClear()(Code)
Whether objects clear when entering transactions.



getAutoDetach
public int getAutoDetach()(Code)
Bit flags marked in AutoDetach which indicate when persistent managed objects should be automatically detached in-place.



getBrokerFactory
public BrokerFactory getBrokerFactory()(Code)
Return the factory that produced this broker.



getConnectionRetainMode
public int getConnectionRetainMode()(Code)
Return the connection retain mode for this broker.



getEvictFromDataCache
public boolean getEvictFromDataCache()(Code)
Whether to also evict an object from the store cache when it is evicted through this broker.



getIdentitySequence
public Seq getIdentitySequence(ClassMetaData meta)(Code)
Returns a Seq for the datastore identity values of the specified persistent class, or null if the class' identity cannot be represented as a sequence.



getIgnoreChanges
public boolean getIgnoreChanges()(Code)
Whether to take into account changes in the transaction when executing a query or iterating an extent.



getInverseManager
public InverseManager getInverseManager()(Code)
Return the inverse manager in use.
since:
   0.3.2



getLifecycleEventManager
public LifecycleEventManager getLifecycleEventManager()(Code)
Return the lifecycle event manager associated with the broker.



getLifecycleListenerCallbackMode
public int getLifecycleListenerCallbackMode()(Code)
The callback mode for handling exceptions from lifecycle event listeners.



getManagedRuntime
public ManagedRuntime getManagedRuntime()(Code)
Return the managed runtime in use.



getMultithreaded
public boolean getMultithreaded()(Code)
Whether the broker or its managed instances are used in a multithreaded environment.



getNontransactionalRead
public boolean getNontransactionalRead()(Code)
Whether to allow nontransactional access to persistent state.



getNontransactionalWrite
public boolean getNontransactionalWrite()(Code)
Whether to allow nontransactional changes to persistent state.



getOptimistic
public boolean getOptimistic()(Code)
Whether to use optimistic transactional semantics.



getRestoreState
public int getRestoreState()(Code)
Whether to restore an object's original state on rollback.



getRetainState
public boolean getRetainState()(Code)
Whether objects retain their persistent state on transaction commit.



getRollbackCause
public Throwable getRollbackCause()(Code)
Returns the Throwable that caused the transaction to be marked for rollback. the Throwable, or null if none was given
since:
   0.9.7



getRollbackOnly
public boolean getRollbackOnly()(Code)
Return whether the current transaction has been marked for rollback.



getSyncWithManagedTransactions
public boolean getSyncWithManagedTransactions()(Code)
Whether to check for a global transaction upon every managed, non-transactional operation. Defaults to false.



getTransactionListenerCallbackMode
public int getTransactionListenerCallbackMode()(Code)
The callback mode for handling exceptions from transaction event listeners.



getUserObject
public Object getUserObject(Object key)(Code)
Get the value for the specified key from the map of user objects.
since:
   0.3.2



getValueSequence
public Seq getValueSequence(FieldMetaData fmd)(Code)
Returns a Seq for the generated values of the specified field, or null if the field is not generated.



isCloseInvoked
public boolean isCloseInvoked()(Code)
Whether Broker.close has been invoked, though the broker might remain open until the current managed transaction completes.



isClosed
public boolean isClosed()(Code)
Whether the broker is closed.



isDetached
public boolean isDetached(Object obj)(Code)
Returns true if obj is a detached object (one that can be reattached to a Broker via a call to Broker.attach ); otherwise returns false.



isDetachedNew
public boolean isDetachedNew()(Code)
Whether to treat relations to detached instances during persist operations as new or as pseudo-hollow instances.



lock
public void lock(Object pc, int level, int timeout, OpCallbacks call)(Code)
Ensure that the given instance is locked at the given lock level.
Parameters:
  pc - the object to lock
Parameters:
  level - the lock level to use
Parameters:
  timeout - the number of milliseconds to wait for the lock beforegiving up, or -1 for no limit
since:
   0.3.1



lock
public void lock(Object pc, OpCallbacks call)(Code)
Ensure that the given instance is locked at the current lock level, as set in the FetchConfiguration for the broker.
since:
   0.3.1



lockAll
public void lockAll(Collection objs, int level, int timeout, OpCallbacks call)(Code)
Ensure that the given instances are locked at the given lock level.
Parameters:
  objs - the objects to lock
Parameters:
  level - the lock level to use
Parameters:
  timeout - the number of milliseconds to wait for the lock beforegiving up, or -1 for no limit
since:
   0.3.1



lockAll
public void lockAll(Collection objs, OpCallbacks call)(Code)
Ensure that the given instances are locked at the current lock level, as set in the FetchConfiguration for the broker.
since:
   0.3.1



newExtent
public Extent newExtent(Class cls, boolean subs)(Code)
Return an extent of the given class, optionally including subclasses.



newInstance
public Object newInstance(Class cls)(Code)
Create a new instance of type cls. If cls is an interface or an abstract class whose abstract methods follow the JavaBeans convention, this method will create a concrete implementation according to the metadata that defines the class. Otherwise, if cls is a managed type, this will return an instance of the specified class.
throws:
  IllegalArgumentException - if cls is not a managedtype or interface.



newQuery
public Query newQuery(String language, Class cls, Object query)(Code)
Create a new query from the given data, with the given candidate class and language.



newQuery
public Query newQuery(String language, Object query)(Code)
Create a new query in the given language.



persist
public void persist(Object obj, OpCallbacks call)(Code)
Persist the given object.



persist
public OpenJPAStateManager persist(Object pc, Object id, OpCallbacks call)(Code)
Make the given instance persistent. Unlike other persist operations, this method does not immediately cascade to fields marked ValueMetaData.CASCADE_IMMEDIATE .
Parameters:
  pc - the instance to persist
Parameters:
  id - the id to give the state manager; may be null for default the state manager for the newly persistent instance



persistAll
public void persistAll(Collection objs, OpCallbacks call)(Code)
Persist the given objects.



preFlush
public void preFlush()(Code)
Run pre-flush actions on transactional objects, including persistence-by-reachability, inverse relationship management, deletion of dependent instances, and instance callbacks. Transaction listeners are not invoked.
since:
   0.3.3



putUserObject
public Object putUserObject(Object key, Object val)(Code)
Put the specified key-value pair into the map of user objects. Use a value of null to remove the key.
since:
   0.3.2



refresh
public void refresh(Object pc, OpCallbacks call)(Code)
Refresh the state of the given object.



refreshAll
public void refreshAll(Collection objs, OpCallbacks call)(Code)
Refresh the state of the given objects.



release
public void release(Object pc, OpCallbacks call)(Code)
Release the given object from management. This operation is not recursive.



releaseAll
public void releaseAll(Collection objs, OpCallbacks call)(Code)
Release the given objects from management. This operation is not recursive.



releaseSavepoint
public void releaseSavepoint()(Code)
Release the last set savepoint and any resources associated with it. The given savepoint and any set after it will become invalid.



releaseSavepoint
public void releaseSavepoint(String name)(Code)
Release the savepoint and any resources associated with it. The given savepoint and any set after it will become invalid.



removeLifecycleListener
public void removeLifecycleListener(Object listener)(Code)
Remove a listener for lifecycle-related events.
since:
   0.3.3



removeTransactionListener
public void removeTransactionListener(Object listener)(Code)
Remove a listener for transaction-related events.
since:
   0.2.5



rollback
public void rollback()(Code)
Rollback the current transaction.



rollbackAndResume
public void rollbackAndResume()(Code)
Issue a rollback and then start a new transaction. This is identical to:
 broker.rollback (); broker.begin ();
 
except that the broker's internal atomic lock is utilized, so this method can be safely executed from multiple threads.
See Also:   Broker.rollback()
See Also:   Broker.begin()
since:
   0.2.4



rollbackToSavepoint
public void rollbackToSavepoint()(Code)
Rollback the current transaction to the last savepoint. Savepoints set after this one will become invalid.



rollbackToSavepoint
public void rollbackToSavepoint(String name)(Code)
Rollback the current transaction to the given savepoint name. Savepoints set after this one will become invalid.



setAutoClear
public void setAutoClear(int clear)(Code)
Whether objects clear when entering transactions.



setAutoDetach
public void setAutoDetach(int flags)(Code)
Bit flags marked in AutoDetach which indicate when persistent managed objects should be automatically detached in-place.



setAutoDetach
public void setAutoDetach(int flag, boolean on)(Code)
Bit flags marked in AutoDetach which indicate when persistent managed objects should be automatically detached in-place.



setDetachedNew
public void setDetachedNew(boolean isNew)(Code)
Whether to treat relations to detached instances as new.



setEvictFromDataCache
public void setEvictFromDataCache(boolean evict)(Code)
Whether to also evict an object from the store cache when it is evicted through this broker.



setIgnoreChanges
public void setIgnoreChanges(boolean ignore)(Code)
Whether to take into account changes in the transaction when executing a query or iterating an extent.



setImplicitBehavior
public void setImplicitBehavior(OpCallbacks call, RuntimeExceptionTranslator ex)(Code)
Set the broker's behavior for implicit actions such as flushing, automatic detachment, and exceptions thrown by managed instances outside a broker operation. A broker's implicit behavior can only be set once; after the first invocation with non-null arguments, subsequent invocations of this method are ignored.



setLifecycleListenerCallbackMode
public void setLifecycleListenerCallbackMode(int mode)(Code)
The callback mode for handling exceptions from lifecycle event listeners.



setMultithreaded
public void setMultithreaded(boolean multi)(Code)
Whether the broker or its managed instances are used in a multithreaded environment.



setNontransactionalRead
public void setNontransactionalRead(boolean read)(Code)
Whether to allow nontransactional access to persistent state.



setNontransactionalWrite
public void setNontransactionalWrite(boolean write)(Code)
Whether to allow nontransactional changes to persistent state.



setOptimistic
public void setOptimistic(boolean opt)(Code)
Whether to use optimistic transactional semantics.



setRestoreState
public void setRestoreState(int restore)(Code)
Whether to restore an object's original state on rollback.



setRetainState
public void setRetainState(boolean retain)(Code)
Whether objects retain their persistent state on transaction commit.



setRollbackOnly
public void setRollbackOnly()(Code)
Mark the current transaction for rollback.



setRollbackOnly
public void setRollbackOnly(Throwable cause)(Code)
Mark the current transaction for rollback with the specified cause of the rollback.
since:
   0.9.7



setSavepoint
public void setSavepoint(String name)(Code)
Set a transactional savepoint where operations after this savepoint will be rolled back.



setSyncWithManagedTransactions
public void setSyncWithManagedTransactions(boolean resync)(Code)
Whether to check for a global transaction upon every managed, non-transactional operation. Defaults to false.



setTransactionListenerCallbackMode
public void setTransactionListenerCallbackMode(int mode)(Code)
The callback mode for handling exceptions from transaction event listeners.



syncWithManagedTransaction
public boolean syncWithManagedTransaction()(Code)
Attempt to synchronize with a current managed transaction, returning true if successful, false if no managed transaction is active.



validateChanges
public void validateChanges()(Code)
Validate the changes made in this transaction, reporting any optimistic violations, constraint violations, etc. In a datastore transaction or a flushed optimistic transaction, this method will act just like Broker.flush . In an optimistic transaction that has not yet begun a datastore-level transaction, however, it will only report exceptions that would occur on flush, without retaining any datastore resources.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.