Write/Read Context operations

23 views
Skip to first unread message

Randy Prager

unread,
Apr 16, 2015, 12:32:25 PM4/16/15
to java-ch...@googlegroups.com
We wanted to confirm API requirements:

Should you only modify (change) values of a DirectReference VOInterface object inside of a 

 try (WriteContext<> context = cache.acquireUsingLocked(K, V)) {
        V returnedValue = context.value();
        try {
        accessor.accessData(returnedValue);
        } catch (Exception e) {
        log.error("",e);
        }
        }

And in a ReadContext, only perform read access operations?

Peter Lawrey

unread,
Apr 16, 2015, 12:34:44 PM4/16/15
to java-ch...@googlegroups.com
You are right.

In certain cases you can do this outside the block, but it is no longer supported as there is too many ways to get it wrong.

--
You received this message because you are subscribed to the Google Groups "Chronicle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-chronicl...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages