Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329005

Summary: Make availability of locks with timeouts more obvious
Product: [Modeling] EMF Reporter: Eike Stepper <stepper>
Component: cdo.coreAssignee: Eike Stepper <stepper>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: enhancement    
Priority: P3 CC: caspar_d
Version: 4.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: Power to the People
Attachments:
Description Flags
Patch v1 - for future reference none

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