Bug 305272 - [api][dstore][multithread] log close API in ServerLogger
Summary: [api][dstore][multithread] log close API in ServerLogger
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.2 M7   Edit
Assignee: David McKnight CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks: 305276
  Show dependency tree
 
Reported: 2010-03-09 21:29 EST by Noriaki Takatsu CLA
Modified: 2010-03-22 08:27 EDT (History)
1 user (show)

See Also:


Attachments
patch for new closeLogFileStream() api (2.95 KB, patch)
2010-03-10 11:25 EST, David McKnight CLA
no flags Details | Diff
updated patch (1.64 KB, patch)
2010-03-18 09:58 EDT, David McKnight CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Noriaki Takatsu CLA 2010-03-09 21:29:59 EST
In multithread environments, log file must be closed when each client user disconnects from the host. So org.eclipse.dstore.core.server.ServerLogger and IServerLogger should provide an API to close the log file.
Comment 1 Martin Oberhuber CLA 2010-03-10 11:02:12 EST
Note that M6 is the official API freeze in just 1 week. This is negotiatable, but I'd prefer getting in API sooner than later, or not at all.
Comment 2 David McKnight CLA 2010-03-10 11:25:54 EST
Created attachment 161625 [details]
patch for new closeLogFileStream() api
Comment 3 David McKnight CLA 2010-03-10 11:26:21 EST
Noriaki, I've attached a patch.  Let me know whether this is what you're looking for.
Comment 4 Noriaki Takatsu CLA 2010-03-11 03:12:31 EST
Yes, this close API is what we want.
Thanks, Noriaki Takatsu
Comment 5 David McKnight CLA 2010-03-11 12:38:43 EST
I've committed the change to cvs.
Comment 6 Martin Oberhuber CLA 2010-03-15 08:49:42 EDT
This API change is breaking compatibility, because IServerLogger is not marked @noimplement.

As committed, the change is not acceptable in a 3.2 release.
Either mark IServerLogger as @noimplement (in case it was clearly never intended to be implemented by clients), or find an alternative way of adding the API in a compatible manner.

At any rate, PLEASE enable API tooling in your workspace and add an API baseline. This is simple: Just download RSE-SDK-3.1.2.zip, extract it somewhere, and point the API baseline to that location. Then you'll see an error indicator when breaking API.
Comment 7 David McKnight CLA 2010-03-17 11:19:47 EDT
(In reply to comment #6)
> This API change is breaking compatibility, because IServerLogger is not marked
> @noimplement.
> 
> As committed, the change is not acceptable in a 3.2 release.
> Either mark IServerLogger as @noimplement (in case it was clearly never
> intended to be implemented by clients), or find an alternative way of adding
> the API in a compatible manner.

IServerLogger is implemented by ServerLogger and I think that the products using this may extend ServerLogger.  Is it okay to do a @noimplement but extend a class that implements IServerLogger?
Comment 8 Noriaki Takatsu CLA 2010-03-17 22:23:28 EDT
Yes, our prodcut just extends ServerLogger and there is no code that implements IServerLogger.
Comment 9 Martin Oberhuber CLA 2010-03-18 02:44:07 EDT
We have this pattern in other places too (e.g. IFileService) and it works:

 * @noimplement This interface is not intended to be implemented by clients.
 *              File service implementations must subclass
 *              {@link AbstractFileService} rather than implementing this
 *              interface directly.
Comment 10 David McKnight CLA 2010-03-18 09:58:18 EDT
Created attachment 162409 [details]
updated patch

Here's the patch with the @noimplement.
Comment 11 David McKnight CLA 2010-03-18 12:56:01 EDT
I've committed the change to cvs.
Comment 12 Martin Oberhuber CLA 2010-03-19 19:34:25 EDT
Released for 3.2M7.

The version number of o.e.dstore.core as well as the dstore feature had to be reved up to 3.2 due to the API addition, and an API problem filter had to be added for addition of @noimplement. I also documented the API specification update in the build notes.

Please verify with the next I-build that build notes and content are as expected.
Comment 13 David McKnight CLA 2010-03-22 08:27:17 EDT
Thanks Martin.