mirror of https://github.com/apache/activemq.git
commit patch for https://issues.apache.org/jira/browse/AMQ-3618
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1210506 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b7e31aca70
commit
5bd4b19fab
|
@ -59,8 +59,8 @@ public final class OpenWireFormat implements WireFormat {
|
||||||
private short nextMarshallCacheIndex;
|
private short nextMarshallCacheIndex;
|
||||||
private short nextMarshallCacheEvictionIndex;
|
private short nextMarshallCacheEvictionIndex;
|
||||||
private Map<DataStructure, Short> marshallCacheMap = new HashMap<DataStructure, Short>();
|
private Map<DataStructure, Short> marshallCacheMap = new HashMap<DataStructure, Short>();
|
||||||
private DataStructure marshallCache[] = new DataStructure[MARSHAL_CACHE_SIZE];
|
private DataStructure marshallCache[] = null;
|
||||||
private DataStructure unmarshallCache[] = new DataStructure[MARSHAL_CACHE_SIZE];
|
private DataStructure unmarshallCache[] = null;
|
||||||
private DataByteArrayOutputStream bytesOut = new DataByteArrayOutputStream();
|
private DataByteArrayOutputStream bytesOut = new DataByteArrayOutputStream();
|
||||||
private DataByteArrayInputStream bytesIn = new DataByteArrayInputStream();
|
private DataByteArrayInputStream bytesIn = new DataByteArrayInputStream();
|
||||||
private WireFormatInfo preferedWireFormatInfo;
|
private WireFormatInfo preferedWireFormatInfo;
|
||||||
|
@ -572,6 +572,10 @@ public final class OpenWireFormat implements WireFormat {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCacheEnabled(boolean cacheEnabled) {
|
public void setCacheEnabled(boolean cacheEnabled) {
|
||||||
|
if(cacheEnabled){
|
||||||
|
marshallCache = new DataStructure[MARSHAL_CACHE_SIZE];
|
||||||
|
unmarshallCache = new DataStructure[MARSHAL_CACHE_SIZE];
|
||||||
|
}
|
||||||
this.cacheEnabled = cacheEnabled;
|
this.cacheEnabled = cacheEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue