Skip to content
This repository has been archived by the owner on Jan 14, 2018. It is now read-only.

Commit

Permalink
Work on issue #246. Seems solved.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanenicolas committed Jan 13, 2014
1 parent 8e87a20 commit 0db4b1b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public void run() {
if (spiceService == null) {
return;
}
while (!isStopped && !Thread.interrupted()) {
while (!requestQueue.isEmpty() || !isStopped && !Thread.interrupted()) {
try {
sendRequestToService(requestQueue.take());
} catch (final InterruptedException ex) {
Expand Down Expand Up @@ -1226,7 +1226,7 @@ protected void waitForServiceToBeBound() throws InterruptedException {

lockAcquireService.lock();
try {
while (spiceService == null && !isStopped) {
while (spiceService == null && (!requestQueue.isEmpty() || !isStopped)) {
conditionServiceBound.await();
}
Ln.d("Bound ok.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ protected ExecutorService getExecutorService() {

/**
* Creates the SpiceServiceListenerNotifier.
* @return ({@link SpiceServiceListenerNotifier)
* @return ({@link SpiceServiceListenerNotifier)}
*/
protected SpiceServiceListenerNotifier createSpiceServiceListenerNotifier() {
return new SpiceServiceListenerNotifier();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void notifyObserversOfRequestCancellation(CachedSpiceRequest<?> request)
/**
* Notify interested observers of request progress.
* @param request the request in progress.
* @param progress the progress of the request.
* @param requestProgress the progress of the request.
*/
public void notifyObserversOfRequestProgress(CachedSpiceRequest<?> request, RequestProgress requestProgress) {
RequestProcessingContext requestProcessingContext = new RequestProcessingContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ public interface RetryPolicy {
*/
int getRetryCount();

/** @return the delay to sleep between each retry attempt (in ms). */
/** Hook method invoked when an exception occured. Define your retry strategy here.
* @param e the exception that occured during last request invocation. */
void retry(SpiceException e);

/** @return the delay to sleep between each retry attempt (in ms). */
Expand Down

0 comments on commit 0db4b1b

Please sign in to comment.