publicbooleantryPass(Context context){// Template implementation.
熔断器关闭则可以通过
if(currentState.get()==State.CLOSED){returntrue;}if(currentState.get()==State.OPEN){// For half-open state we allow a request for probing.
下个时间点到了 则允许请求通过
returnretryTimeoutArrived()&&fromOpenToHalfOpen(context);}returnfalse;}