答案 0 :(得分:-2)
如果你想创建一个数字旋转并且你想在IE中使用它,那么我建议你改用@Region("deltaTesting")
public class DeltaTesting implements Delta,Serializable {
private static final long serialVersionUID = 1L;
public DeltaTesting(){
}
public DeltaTesting(String id, String firstName, String lastName){
this.id = id;
this.firstName = firstName;
this.lastName = lastName;
}
@Id
private String id;
private String firstName;
private String lastName;
private transient boolean stringId = false;
private transient boolean stringFirstName = false;
private transient boolean stringLastName = false;
public String getId() {
return id;
}
public void setId(String id) {
this.stringId = true;
this.id = id;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.stringFirstName = true;
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.stringLastName = true;
this.lastName = lastName;
}
@Override
public void fromDelta(DataInput in) throws IOException, InvalidDeltaException {
// TODO Auto-generated method stub
System.out.println("Applying delta to " + this.toString());
// For each field, read whether there is a change
if (in.readBoolean()) {
// Read the change and apply it to the object
this.id = in.readLine();
System.out.println(" Applied delta to field 'id' = "
+ this.id);
}
if (in.readBoolean()) {
// Read the change and apply it to the object
this.firstName = in.readLine();
System.out.println(" Applied delta to field 'firstname' = "
+ this.firstName);
}
if (in.readBoolean()) {
// Read the change and apply it to the object
this.lastName = in.readLine();
System.out.println(" Applied delta to field 'lastname' = "
+ this.lastName);
}
}
@Override
public boolean hasDelta() {
// TODO Auto-generated method stub
return this.stringId || this.stringFirstName || this.stringLastName;
}
@Override
public void toDelta(DataOutput out) throws IOException {
out.writeBoolean(stringId);
// TODO Auto-generated method stub
if (stringId) {
out.writeBytes(this.id);
this.stringId = false;
System.out.println(" Extracted delta from field 'id' = " + this.id);
}
out.writeBoolean(stringFirstName);
if (stringFirstName) {
out.writeBytes(this.firstName);
this.stringFirstName = false;
System.out.println(" Extracted delta from field 'firstName' = " + this.firstName);
}
out.writeBoolean(stringLastName);
if (stringLastName) {
out.writeBytes(this.lastName);
this.stringLastName = false;
System.out.println(" Extracted delta from field 'lastName' = " + this.lastName);
}
}
}
**cache.xml**
<pdx>
<pdx-serializer>
<class-name>com.gemstone.gemfire.pdx.ReflectionBasedAutoSerializer</class-
name>
<parameter name="classes">
<string>com\.xxx\..+</string>
</parameter>
</pdx-serializer>
</pdx>
,因为IE不支持JavaScript,所以你不能使用spin。