geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisSet.java
@Override
  public synchronized void toData(DataOutput out, SerializationContext context) throws IOException {
    super.toData(out, context);
    DataSerializer.writePrimitiveInt(members.size(), out);
    for (byte[] member : members) {
      DataSerializer.writeByteArray(member, out);
    }
  }
/**
   * Since GII (getInitialImage) can come in and call toData while other threads
   * are modifying this object, the striped executor will not protect toData.
   * So any methods that modify "members" needs to be thread safe with toData.
   */
Since GII (getInitialImage) can come in and call toData while other threads
are modifying this object, the striped executor will not protect toData.
So any methods that modify "members" needs to be thread safe with toData.
Since GII ( getInitialImage ) can come in and call toData while other threads are modifying this object the striped executor will not protect toData . So any methods that modify " members " needs to be thread safe with toData .
@Override
  public synchronized void toData(DataOutput out, SerializationContext context) throws IOException {
    super.toData(out, context);
    DataSerializer.writePrimitiveInt(members.size(), out);
    for (byte[] member : members) {
      DataSerializer.writeByteArray(member, out);
    }
  }
@ Override public synchronized void toData ( DataOutput out , SerializationContext context ) throws IOException { super . toData ( out , context ) ; DataSerializer . writePrimitiveInt ( members . size ( ) , out ) ; for ( byte [ ] member : members ) { DataSerializer . writeByteArray ( member , out ) ; } }
Since GII (getInitialImage) can come in and call toData while other threads
 are modifying this object, the striped executor will not protect toData.
Since GII ( getInitialImage ) can come in and call toData while other threads are modifying this object the striped executor will not protect toData .