private long maxInactivityDuration = 30*1000;
private long maxInactivityDurationInitalDelay = 10*1000;
private int cacheSize = 1024;
public WireFormat createWireFormat() {
WireFormatInfo info = new WireFormatInfo();
info.setVersion(version);
try {
info.setStackTraceEnabled(stackTraceEnabled);
info.setCacheEnabled(cacheEnabled);
info.setTcpNoDelayEnabled(tcpNoDelayEnabled);
info.setTightEncodingEnabled(tightEncodingEnabled);
info.setSizePrefixDisabled(sizePrefixDisabled);
info.setMaxInactivityDuration(maxInactivityDuration);
info.setMaxInactivityDurationInitalDelay(maxInactivityDurationInitalDelay);
info.setCacheSize(cacheSize);
} catch (Exception e) {
IllegalStateException ise = new IllegalStateException("Could not configure WireFormatInfo");
ise.initCause(e);
throw ise;
}