ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Evdokimov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-379) Need to update CacheStore and CacheStoreSession APIs for conssitency
Date Wed, 04 Mar 2015 09:57:04 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14346663#comment-14346663

Sergey Evdokimov commented on IGNITE-379:

Dmitry, are you sure that CacheStoreSession.properties() should be replaced with CacheStoreSession.attach(Object)
& CacheStoreSession.getAttach() ? 
I think we should create CacheStoreSession.getAttribute(String) , CacheStoreSession.setAttribute(String,
Object) to be consistent with other kind of sessions like javax.servlet.http.HttpSession.

CacheStoreSession.attach(Object) & CacheStoreSession.getAttach() may be cause of problems.
For example we have CacheJdbcBlobStore that stores Connection to CacheStoreSession, it saves
connection using CacheStoreSession.attach(Connection). User may want to create his store implementation
that extends CacheJdbcBlobStore he may need to store his property to CacheStoreSession, but
he cannot because CacheStoreSession.attach(Object) is used by CacheJdbcBlobStore.

> Need to update CacheStore and CacheStoreSession APIs for conssitency
> --------------------------------------------------------------------
>                 Key: IGNITE-379
>                 URL: https://issues.apache.org/jira/browse/IGNITE-379
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>            Reporter: Dmitriy Setrakyan
>            Assignee: Sergey Evdokimov
>            Priority: Blocker
>             Fix For: sprint-2
> From mailing archives:
> {noformat}
> In the "Persistent Store" documentation I have tried the API changes I suggested, and
I think it looks good and consistent:
> http://apacheignite.readme.io/v1.0/docs/persistent-store
> Would be nice if we could make these changes in sprint-2. They are very minimal.
> I have also asked Andrey N and Alexey K to document the automatic DB schema integration,
which is a big differentiating feature for Ignite.
> Hopefully we will have complete Data Grid documentation next week.
> D.
> On Sat, Feb 28, 2015 at 10:03 AM, Dmitriy Setrakyan <dsetrakyan@apache.org> wrote:
> I am looking at the store and how it interacts with the session and think we should make
some changes:
> 1. There is no need to have a HashMap for session properties. We can just have attach(Object)
and getAttached(). If user wants to attach a HashMap there, he still can.
> 2. I don't think CacheStore.txEnd() method is correct. We should call it CacheStore.sessionEnd().
For non-transactional operations, this method should be invoked after each call, and for transactional
operations, it should be invoked only after transaction completed.
> 3. I also have added isWithinTransaction() method to the session for convenience.
> I think the above change will allow us to have the same session semantics between transactional
and non-transactional caches.
> Thoughts?
> D.
> {noformat}

This message was sent by Atlassian JIRA

View raw message