Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added more explanation to README

  • Loading branch information...
commit d1f736a04330fde1558b2076c477ff311d831331 1 parent 64db548
Tamas Cservenak cstamas authored

Showing 1 changed file with 20 additions and 0 deletions. Show diff stats Hide diff stats

  1. +20 0 README.md
20 README.md
Source Rendered
@@ -3,5 +3,25 @@ SISU Charger
3 3
4 4 Reusable library for simple parallel invocation of sequential steps.
5 5
  6 +For Shiro support, use the org.sonatype.sisu.charger.shiro.DefaultShiroAwareCharger class.
  7 +
  8 +Example use:
  9 +
  10 +
  11 + final CallableExecutor executor = ... you implement it, for example using Java's ExecutorService
  12 + final Charger charger = new DefaultCharger();
  13 +
  14 + List<Callable<String>> callables = new ArrayList<Callable<String>>();
  15 +
  16 + callables.add( new HelloCallable( "Jason" ) );
  17 + callables.add( new HelloCallableWithExceptionHandler( "Stuart" ) );
  18 +
  19 + ChargeFuture<String> cf =
  20 + charger.submit( callables, new AllArrivedChargeStrategy<String>(), executor );
  21 +
  22 + final List<String> result = cf.getResult();
  23 +
  24 +
  25 +
6 26 Have fun,
7 27 Sonatype Team

0 comments on commit d1f736a

Please sign in to comment.
Something went wrong with that request. Please try again.