Class TimestampLockingPolicy

java.lang.Object
org.eclipse.persistence.descriptors.VersionLockingPolicy
org.eclipse.persistence.descriptors.TimestampLockingPolicy
All Implemented Interfaces:
Serializable, Cloneable, OptimisticLockingPolicy

public class TimestampLockingPolicy extends VersionLockingPolicy

Purpose: Used to allow a single version timestamp to be used for optimistic locking.

Since:
TOPLink/Java 2.0
See Also:
  • Field Details

    • retrieveTimeFrom

      protected int retrieveTimeFrom
    • SERVER_TIME

      public static final int SERVER_TIME
      See Also:
    • LOCAL_TIME

      public static final int LOCAL_TIME
      See Also:
  • Constructor Details

    • TimestampLockingPolicy

      public TimestampLockingPolicy()
      PUBLIC: Create a new TimestampLockingPolicy. Defaults to using the time retrieved from the server.
    • TimestampLockingPolicy

      public TimestampLockingPolicy(String fieldName)
      PUBLIC: Create a new TimestampLockingPolicy. Defaults to using the time retrieved from the server.
      Parameters:
      fieldName - the field where the write lock value will be stored.
    • TimestampLockingPolicy

      public TimestampLockingPolicy(DatabaseField field)
      INTERNAL: Create a new TimestampLockingPolicy. Defaults to using the time retrieved from the server.
      Parameters:
      field - the field where the write lock value will be stored.
  • Method Details