Bug 1118679 - 13.10.4. Hot Rod Java Client Versioned API, getWithVersion
Summary: 13.10.4. Hot Rod Java Client Versioned API, getWithVersion
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Documentation
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: GA
: 6.3.0
Assignee: Misha H. Ali
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-11 09:00 UTC by Vitalii Chepeliuk
Modified: 2014-07-21 02:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Build Name: 12532, Administration and Configuration Guide-6.3 Build Date: 07-07-2014 11:21:19 Topic ID: 26508-635853 [Latest]
Last Closed: 2014-07-21 02:14:32 UTC
Type: Bug


Attachments (Terms of Use)

Description Vitalii Chepeliuk 2014-07-11 09:00:04 UTC
Title: Hot Rod Java Client Versioned API

Describe the issue:
There is no getWithVersion method, please remove it 
And example code should be changed 

Suggestions for improvement:
Example 13.4. Using Versioned Methods
// To use the versioned API, remote classes are specifically needed
RemoteCacheManager remoteCacheManager = new RemoteCacheManager();
RemoteCache<String, String> cache = remoteCacheManager.getCache();
remoteCache.put("car", "ferrari");
VersionedValue valueBinary = remoteCache.getVersioned("car");
// removal only takes place only if the version has not been changed
// in between. (a new version is associated with 'car' key on each change)
assert remoteCache.remove("car", valueBinary.getVersion());
assert !cache.containsKey("car");

Example 13.5. Using Replace

remoteCache.put("car", "ferrari");
VersionedValue valueBinary = remoteCache.getVersioned("car");
assert remoteCache.replace("car", "lamborghini", valueBinary.getVersion());



Additional information:

Comment 3 Vitalii Chepeliuk 2014-07-14 07:27:14 UTC
Misha please change code samples as proposed above
Example 13.4. Using Versioned Methods
// To use the versioned API, remote classes are specifically needed
RemoteCacheManager remoteCacheManager = new RemoteCacheManager();
RemoteCache<String, String> cache = remoteCacheManager.getCache();
remoteCache.put("car", "ferrari");
VersionedValue valueBinary = remoteCache.getVersioned("car");
// removal only takes place only if the version has not been changed
// in between. (a new version is associated with 'car' key on each change)
assert remoteCache.remove("car", valueBinary.getVersion());
assert !cache.containsKey("car");

Example 13.5. Using Replace

remoteCache.put("car", "ferrari");
VersionedValue valueBinary = remoteCache.getVersioned("car");
assert remoteCache.replace("car", "lamborghini", valueBinary.getVersion());

Comment 5 Misha H. Ali 2014-07-21 02:14:32 UTC
Now available on access.redhat.com under the JBoss Data Grid 6.3 documentation label.


Note You need to log in before you can comment on or make changes to this bug.