public void setInt(int v) {
    byte[] bytes = CACHED_INTS.get(v);
    if (bytes == null) {
      bytes = new byte[4];
      encodeInt(v, bytes);
      CACHED_INTS.put(v, bytes);
    }
    typeCode = BYTE_CODE;
    part = bytes;
  }
Like getString but will also check a cache of frequently serialized strings.
The result will be added to the cache if it is not already in it.
NOTE: only call this for strings that are reused often (like region names).
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/Part.java