public static boolean isPdxSerializationInProgress() {
    Boolean v = pdxSerializationInProgress.get();
    return v != null && v;
  }
Just like readObject but make sure and pdx deserialized is not a PdxInstance.

@since GemFire 6.6.2
geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java