@Override public void toData(DataOutput out) throws IOException {
  out.writeInt(maxInactiveInterval);
  out.writeLong(lastAccessedTime);
synchronized (attributes) {
    out.writeInt(attributes.size());
    for (    Map.Entry<String,Object> entry : attributes.entrySet()) {
      DeltaEvent delta=new DeltaEvent(true,entry.getKey(),entry.getValue());
      DataSerializer.writeObject(delta,out);
    }
  }
  out.writeUTF(jvmOwnerId);
}

@ Override public void toData ( DataOutput out ) throws IOException { out . writeInt ( maxInactiveInterval ) ; out . writeLong ( lastAccessedTime ) ; synchronized ( attributes ) { out . writeInt ( attributes . size ( ) ) ; for ( Map . Entry < String , Object > entry : attributes . entrySet ( ) ) { DeltaEvent delta = new DeltaEvent ( true , entry . getKey ( ) , entry . getValue ( ) ) ; DataSerializer . writeObject ( delta , out ) ; } } out . writeUTF ( jvmOwnerId ) ; }
use deltaevents to propagate the actual attribute data - deltaevents turn the values into byte arrays which means that the actual domain classes are not required on the server .
