Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch/Pipeline operations support #42

Closed
mrniko opened this issue Jul 17, 2014 · 1 comment
Closed

Batch/Pipeline operations support #42

mrniko opened this issue Jul 17, 2014 · 1 comment
Labels
Milestone

Comments

@mrniko
Copy link
Member

mrniko commented Jul 17, 2014

Operates with async methods only. Code example:

RBatch batch = redisson.createBatch();

RMap<Integer, Integer> map = redisson.getMap("map");
map.fastPutAsync(1, 2);
map.putAsync(2, 3);
map.fastPutAsync(3, 4);

List<Future<?>> futures = batch.execute();
// or
Future<List<Future<?>>> futures = batch.executeAsync();
@mrniko mrniko added the feature label Jul 17, 2014
@mrniko mrniko added this to the 1.3 milestone Jul 20, 2014
@mrniko mrniko modified the milestones: 1.2.1, 1.2.2 Mar 14, 2015
@enghch
Copy link

enghch commented Apr 18, 2015

Shouldn't it be more like this:

RBatch batch = redisson.createBatch();

RMap<Integer, Integer> map = batch.getMap("map");
Future<?> future1 = map.fastPutAsync(1, 2);
Future<?> future2 = map.putAsync(2, 3);
Future<?> future3 = map.fastPutAsync(3, 4);

List<?> futures = batch.execute();
// or
Future<List<?>> futures = batch.executeAsync();

Note the use of batch.getMap instead of redisson.getMap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants