Gemfire JavaDocs
Package org.apache.geode.pdx
Interface WritablePdxInstance
-
- All Superinterfaces:
Document
,PdxInstance
,java.io.Serializable
public interface WritablePdxInstance extends PdxInstance
WritablePdxInstance is aPdxInstance
that also supports field modification using thesetField
method. To get a WritablePdxInstance callcreateWriter
.- Since:
- GemFire 6.6
-
-
Field Summary
-
Fields inherited from interface org.apache.geode.cache.Document
FIELD_NOT_FOUND
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
setField(java.lang.String fieldName, java.lang.Object value)
Set the existing named field to the given value.-
Methods inherited from interface org.apache.geode.cache.Document
foreach, getAndCheckField, getFieldNames, hasField
-
Methods inherited from interface org.apache.geode.pdx.PdxInstance
createWriter, equals, getClassName, getField, getObject, hashCode, isDeserializable, isEnum, isIdentityField, toString
-
-
-
-
Method Detail
-
setField
void setField(java.lang.String fieldName, java.lang.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.- Parameters:
fieldName
- name of the field whose value will be setvalue
- value that will be assigned to the field- Throws:
PdxFieldDoesNotExistException
- if the named field does not existPdxFieldTypeMismatchException
- if the type of the value is not compatible with the field
-
-