Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329005 - Make availability of locks with timeouts more obvious
Summary: Make availability of locks with timeouts more obvious
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard: Power to the People
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-29 03:41 EDT by Eike Stepper CLA
Modified: 2011-06-23 03:37 EDT (History)
1 user (show)

See Also:


Attachments
Patch v1 - for future reference (29.22 KB, patch)
2010-10-29 03:43 EDT, Eike Stepper CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eike Stepper CLA 2010-10-29 03:41:32 EDT
1. Some tests are blocking Hudson because they used CDOLock.lock() rather than CDOLock.tryLock(timeout). Add the method CDOLock.lock(timeout) and enhance the tests.

2. CDOObjectWrapper reimplements its own lock just because the existing implementation is not static. Consolidate this.
Comment 1 Eike Stepper CLA 2010-10-29 03:43:17 EDT
Created attachment 182016 [details]
Patch v1 - for future reference
Comment 2 Eike Stepper CLA 2010-10-29 03:45:30 EDT
The following methods are added to CDOLock:

  public void lock(long time, TimeUnit unit) throws TimeoutException;
  public void lock(long millis) throws TimeoutException;
  public boolean tryLock(long millis) throws InterruptedException;

Committed to HEAD
Comment 3 Caspar D. CLA 2010-11-01 01:30:00 EDT
I looked at the contents of the patch, and it seems you already
committed it (or part of it?). So I'm not sure what you want me to
update...
Comment 4 Eike Stepper CLA 2011-06-23 03:37:35 EDT
Available in R20110608-1407