GemFire 7.0

Interface WritablePdxInstance

All Superinterfaces:
PdxInstance, Serializable

public interface WritablePdxInstance
extends PdxInstance

WritablePdxInstance is a PdxInstance that also supports field modification using the setField method. To get a WritablePdxInstance call createWriter.


Method Summary
 void setField(String fieldName, Object value)
          Set the existing named field to the given value.
Methods inherited from interface com.gemstone.gemfire.pdx.PdxInstance
createWriter, equals, getClassName, getField, getFieldNames, getObject, hasField, hashCode, isEnum, isIdentityField, toString

Method Detail


void setField(String fieldName,
              Object value)
Set the existing named field to the given value. The setField method has copy-on-write semantics. So for the modifications to be stored in the cache the WritablePdxInstance must be put into a region after setField has been called one or more times.

fieldName - name of the field whose value will be set
value - value that will be assigned to the field
PdxFieldDoesNotExistException - if the named field does not exist
PdxFieldTypeMismatchException - if the type of the value is not compatible with the field

GemFire 7.0

Copyright © 1997-2012 VMware, Inc. All rights reserved.