Home » Modeling » EMF » [CDO] Branchpoints in custom stores
[CDO] Branchpoints in custom stores [message #521842] |
Thu, 18 March 2010 16:36 |
Oliver Messages: 20 Registered: July 2009 |
Junior Member |
|
|
Hi,
I should like to port my old CDO store from CDO version 2.0 to 3.0. The
old store hasn't versioning support, and I don't need versioning in the
new store.
There are two methods declared in the new IStoreAccessor:
- InternalCDORevision readRevision(CDOID id,
CDOBranchPoint branchPoint, int listChunk,
CDORevisionCacheAdder cache)
- InternalCDORevision readRevisionByVersion(CDOID id,
CDOBranchVersion branchVersion, int listChunk,
CDORevisionCacheAdder cache)
But in both Javadocs is written "This method will only be called by the
framework if IRepository.isSupportingAudits() is true". So, when I have
properties.put(Props.SUPPORTING_AUDITS, "false"); how does CDO get any
revision from the repository?
Is there any information about the branch-concept of 3.0?
Ciao Oliver
|
|
|
Re: [CDO] Branchpoints in custom stores [message #521945 is a reply to message #521842] |
Fri, 19 March 2010 12:07 |
|
This is a multi-part message in MIME format.
--------------000904040407050703000303
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Am 18.03.2010 22:27, schrieb Oliver:
> Hi,
>
> I should like to port my old CDO store from CDO version 2.0 to 3.0.
> The old store hasn't versioning support, and I don't need versioning
> in the new store.
>
> There are two methods declared in the new IStoreAccessor:
> - InternalCDORevision readRevision(CDOID id,
> CDOBranchPoint branchPoint, int listChunk,
> CDORevisionCacheAdder cache)
> - InternalCDORevision readRevisionByVersion(CDOID id,
> CDOBranchVersion branchVersion, int listChunk,
> CDORevisionCacheAdder cache)
>
> But in both Javadocs is written "This method will only be called by
> the framework if IRepository.isSupportingAudits() is true".
Oh, the JavaDocs had not been considered, yet, by the huge refactoring
during development of the new branching support. I removed the wrong
information and will add more precise one some time later.
You definitely have to implement both methods. If you don't support
branching the passed branch will always be the implicit main branch and
you can ignore it. If you don't support auditing you can delegate one
call to the other like in HibernateStoreAccessor:
| /**
* Not supported by the Hibernate Store, auditing is not supported. Currently ignores the branchVersion and calls the
* {@readRevision(CDOID, CDOBranchPoint, int, CDORevisionCacheAdder)} .
*/
*public
*InternalCDORevision readRevisionByVersion(CDOID id, CDOBranchVersion branchVersion,
*int *listChunk,
CDORevisionCacheAdder cache)
{
*return
*readRevision(id, branchVersion.getBranch().getPoint(System.currentTimeMillis( )), listChunk, cache);
}|
But it strikes me that it should be checked whether the read revision
really has the requested version. Usually no other situation can be
reached, though.
> So, when I have properties.put(Props.SUPPORTING_AUDITS, "false"); how
> does CDO get any revision from the repository?
>
> Is there any information about the branch-concept of 3.0?
Not, yet. I hope that I'll have time for docs after the EclipseCon.
Until then I'm open for more concrete questions ;-)
Cheers
/Eike
----
http://thegordian.blogspot.com
http://twitter.com/eikestepper
--------------000904040407050703000303
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Am 18.03.2010 22:27, schrieb Oliver:
<blockquote cite="mid:hnu5tq$dd4$1@build.eclipse.org" type="cite">Hi,
<br>
<br>
I should like to port my old CDO store from CDO version 2.0 to 3.0. The
old store hasn't versioning support, and I don't need versioning in the
new store.
<br>
<br>
There are two methods declared in the new IStoreAccessor:
<br>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: [CDO] Branchpoints in custom stores [message #522241 is a reply to message #521945] |
Sun, 21 March 2010 16:40 |
Oliver Messages: 20 Registered: July 2009 |
Junior Member |
|
|
Thank you!
Eike Stepper schrieb:
> Am 18.03.2010 22:27, schrieb Oliver:
>> Hi,
>>
>> I should like to port my old CDO store from CDO version 2.0 to 3.0.
>> The old store hasn't versioning support, and I don't need versioning
>> in the new store.
>>
>> There are two methods declared in the new IStoreAccessor:
>> - InternalCDORevision readRevision(CDOID id,
>> CDOBranchPoint branchPoint, int listChunk,
>> CDORevisionCacheAdder cache)
>> - InternalCDORevision readRevisionByVersion(CDOID id,
>> CDOBranchVersion branchVersion, int listChunk,
>> CDORevisionCacheAdder cache)
>>
>> But in both Javadocs is written "This method will only be called by
>> the framework if IRepository.isSupportingAudits() is true".
> Oh, the JavaDocs had not been considered, yet, by the huge refactoring
> during development of the new branching support. I removed the wrong
> information and will add more precise one some time later.
>
> You definitely have to implement both methods. If you don't support
> branching the passed branch will always be the implicit main branch and
> you can ignore it. If you don't support auditing you can delegate one
> call to the other like in HibernateStoreAccessor:
>
> | /**
> * Not supported by the Hibernate Store, auditing is not supported. Currently ignores the branchVersion and calls the
> * {@readRevision(CDOID, CDOBranchPoint, int, CDORevisionCacheAdder)} .
> */
> *public *InternalCDORevision readRevisionByVersion(CDOID id, CDOBranchVersion branchVersion, *int *listChunk,
> CDORevisionCacheAdder cache)
> {
> *return *readRevision(id, branchVersion.getBranch().getPoint(System.currentTimeMillis( )), listChunk, cache);
> }|
>
>
> But it strikes me that it should be checked whether the read revision
> really has the requested version. Usually no other situation can be
> reached, though.
>
>> So, when I have properties.put(Props.SUPPORTING_AUDITS, "false"); how
>> does CDO get any revision from the repository?
>>
>> Is there any information about the branch-concept of 3.0?
> Not, yet. I hope that I'll have time for docs after the EclipseCon.
> Until then I'm open for more concrete questions ;-)
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
|
|
|
Goto Forum:
Current Time: Fri Apr 26 00:26:21 GMT 2024
Powered by FUDForum. Page generated in 0.03446 seconds
|