| Summary: | Add ability to register commit handlers and loggers | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Jos Warmer <jos.warmer> | ||||||
| Component: | cdo.core | Assignee: | Eike Stepper <stepper> | ||||||
| Status: | CLOSED FIXED | QA Contact: | Eike Stepper <stepper> | ||||||
| Severity: | enhancement | ||||||||
| Priority: | P3 | Keywords: | noteworthy | ||||||
| Version: | 4.0 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | Other | ||||||||
| OS: | other | ||||||||
| Whiteboard: | Power to the People | ||||||||
| Attachments: |
|
||||||||
|
Description
Jos Warmer
Created attachment 186015 [details]
Patch v1
I've implemented several new CDOCommitInfoHandlers: AsyncCommitInfoHandler.java BinaryCommitInfoLog.java TextCommitInfoLog.java CDOCommitInfoHandlers can be used in many places. Some examples are in CommitInfoTest: testLogThroughClient() testLogThroughWriteAccessHandler() testLogThroughCommitInfoHandler() I've also created a new public hook in IRepository: addCommitInfoHandler(CDOCommitInfoHandler) removeCommitInfoHandler(CDOCommitInfoHandler) Note that the AsyncCommitInfoHandler needs to be activated/deactivated:
AsyncCommitInfoHandler log = new AsyncCommitInfoHandler(new TextCommitInfoLog(stream));
log.activate();
getRepository().addCommitInfoHandler(log);
...
log.deactivate();
LifecycleUtil.waitForInactive(log, Long.MAX_VALUE);
stream.close();
Created attachment 186017 [details]
Patch v2
Committed to HEAD Available in R20110608-1407 |