@Override
      public void toData(DataOutput out,
          SerializationContext context) throws IOException {
        super.toData(out, context);
        int flags = 0;
        if (hasRegisteredInterest) {
          flags |= HAS_REGISTERED_INTEREST_BIT;
        }
        if (isPrimary) {
          flags |= IS_PRIMARY_BIT;
        }
        out.writeByte(flags & 0xff);
      }
HARegions have their own advisors so that interest registration state can be tracked
geode-core/src/main/java/org/apache/geode/internal/cache/HARegion.java