use of io.narayana.sra.annotation.TimeLimit in project narayana by jbosstm.
the class ServerSRAFilter method getTimeOut.
private long getTimeOut(Method method) {
Annotation timeLimit = method.getDeclaredAnnotation(TimeLimit.class);
if (timeLimit == null)
timeLimit = method.getDeclaringClass().getDeclaredAnnotation(TimeLimit.class);
if (timeLimit == null)
return SRAClient.DEFAULT_TIMEOUT_MILLIS;
TimeLimit tl = (TimeLimit) timeLimit;
return tl.unit().toMillis(tl.limit());
}
Aggregations