Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lock() method #195

Merged
merged 1 commit into from
May 27, 2020
Merged

lock() method #195

merged 1 commit into from
May 27, 2020

Conversation

gavinking
Copy link
Member

@gavinking gavinking commented May 26, 2020

I have hacked together some sort of support for the lock() method.

The only supported lock modes (for now) are:

  • PESSIMISTIC_WRITE
  • PESSIMISTIC_READ

There are no LockingStrategys, this is hardcoded for now.

see #142

@gavinking
Copy link
Member Author

I've added support for PESSIMISTIC_FORCE_INCREMENT, and cleaned up some code.

This is ready to merge.

supported lock modes:

- PESSIMISTIC_LOCK_MODE_WRITE
- PESSIMISTIC_LOCK_MODE_FORCE_INCREMENT
- PESSIMISTIC_LOCK_MODE_READ

not supported:

- optimistic lock modes

see hibernate#142
@gavinking
Copy link
Member Author

OK, after a review of the semantics, I've decided that this now supports all LockModes except OPTIMISTIC and OPTIMISTIC_FORCE_INCREMENT (which we definitely don't need now).

@gavinking
Copy link
Member Author

(Note that it's all implemented in one big method: there's no need for LockingStrategys right now, since we're supporting such a small number of databases.)

@gavinking gavinking linked an issue May 27, 2020 that may be closed by this pull request
@gavinking gavinking merged commit e19fbc7 into hibernate:master May 27, 2020
@gavinking gavinking deleted the lock branch June 15, 2023 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add lock() method
1 participant