Package com.nurkiewicz.asyncretry.policy

Source Code of com.nurkiewicz.asyncretry.policy.OptimisticLockException

package com.nurkiewicz.asyncretry.policy;

import com.nurkiewicz.asyncretry.AbstractBaseTestCase;
import com.nurkiewicz.asyncretry.AsyncRetryContext;

/**
* @author Tomasz Nurkiewicz
* @since 7/18/13, 11:27 PM
*/
public class AbstractRetryPolicyTest extends AbstractBaseTestCase {

  private static final int ANY_RETRY = 7;

  protected boolean shouldRetryOn(RetryPolicy policy, Throwable lastThrowable) {
    return policy.shouldContinue(new AsyncRetryContext(policy, ANY_RETRY, lastThrowable));
  }
}

class OptimisticLockException extends RuntimeException {}
TOP

Related Classes of com.nurkiewicz.asyncretry.policy.OptimisticLockException

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.