* @param out_delay_millis
* @return a reference to the DELAY instance being used by the JGroups stack
* @throws Exception
*/
public static DELAY setDelayForCache(Cache<?, ?> cache, int in_delay_millis, int out_delay_millis) throws Exception {
JGroupsTransport jgt = (JGroupsTransport) TestingUtil.extractComponent(cache, Transport.class);
Channel ch = jgt.getChannel();
ProtocolStack ps = ch.getProtocolStack();
DELAY delay = new DELAY();
delay.setInDelay(in_delay_millis);
delay.setOutDelay(out_delay_millis);
ps.insertProtocol(delay, ProtocolStack.ABOVE, TP.class);