Objectivity for Java Reference

com.objy.db.iapp
Interface PreWriteInfo

All Superinterfaces:
PersistentEventInfo

public interface PreWriteInfo
extends PersistentEventInfo

Defines behavior shared by all pre-write information objects.

Before a persistent object is written to the database, a pre-write event occurs. The object's pre-write method handles the pre-write event; the parameter to that method is a pre-write information object specifying the reason why the object is being written.

You shouldn't need to implement this interface in any class you define.


Fields inherited from interface com.objy.db.iapp.PersistentEventInfo
EVENT_ABORT, EVENT_CHECKPOINT, EVENT_CHECKPOINT_DOWNGRADE, EVENT_COMMIT, EVENT_FLUSH_CONTAINER, EVENT_FLUSH_DB, EVENT_FLUSH_FD, EVENT_MAX, EVENT_WRITE, EVENT_WRITE_BEFORE_COPY_OBJ
 
Method Summary
 int getReason()
          Gets the reason why the pre-write event occurred.
 

Method Detail

getReason

public int getReason()
Gets the reason why the pre-write event occurred.
Returns:
The reason why the pre-write event occurred; one of the following constants defined in the PersistentEventInfo interface:
EVENT_WRITE
The object is being written by its write method.
EVENT_WRITE_BEFORE_COPY_OBJ
The object has to be written before it can be copied.
EVENT_COMMIT
The object is being written during a commit operation.
EVENT_CHECKPOINT
The object is being written during a checkpoint operation with no downgrade of locks.
EVENT_CHECKPOINT_DOWNGRADE
The object is being written during a checkpoint operation with write locks downgraded to read locks.
EVENT_FLUSH_FD
The object is being written during a flush operation on the federated database.
EVENT_FLUSH_DB
The object is being written during a flush operation on its database.
EVENT_FLUSH_CONTAINER
The object is being written during a flush operation on its container.

Objectivity for Java Reference

Copyright © 2000 Objectivity, Inc. All rights reserved.