protected static short set(short flags, short mask, boolean on) {
      return (short) (on ? (flags | mask) : (flags & ~mask));
    }
WARNING: Does not set the bit in place, returns new short with bit set
geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java