use of org.apache.geode.modules.session.catalina.internal.DeltaSessionUpdateAttributeEvent in project geode by apache.
the class DeltaSession8 method setAttribute.
public void setAttribute(String name, Object value, boolean notify) {
checkBackingCacheAvailable();
synchronized (this.changeLock) {
// Serialize the value
byte[] serializedValue = serialize(value);
// Store the attribute locally
if (this.preferDeserializedForm) {
super.setAttribute(name, value, true);
} else {
super.setAttribute(name, serializedValue, true);
}
if (serializedValue == null) {
return;
}
// Create the update attribute message
DeltaSessionAttributeEvent event = new DeltaSessionUpdateAttributeEvent(name, serializedValue);
queueAttributeEvent(event, true);
// Distribute the update
if (!isCommitEnabled()) {
putInRegion(getOperatingRegion(), true, null);
}
}
}
use of org.apache.geode.modules.session.catalina.internal.DeltaSessionUpdateAttributeEvent in project geode by apache.
the class DeltaSession method setAttribute.
public void setAttribute(String name, Object value, boolean notify) {
checkBackingCacheAvailable();
synchronized (this.changeLock) {
// Serialize the value
byte[] serializedValue = serialize(value);
// Store the attribute locally
if (this.preferDeserializedForm) {
super.setAttribute(name, value, true);
} else {
super.setAttribute(name, serializedValue, true);
}
if (serializedValue == null) {
return;
}
// Create the update attribute message
DeltaSessionAttributeEvent event = new DeltaSessionUpdateAttributeEvent(name, serializedValue);
queueAttributeEvent(event, true);
// Distribute the update
if (!isCommitEnabled()) {
putInRegion(getOperatingRegion(), true, null);
}
}
}
use of org.apache.geode.modules.session.catalina.internal.DeltaSessionUpdateAttributeEvent in project geode by apache.
the class DeltaSession7 method setAttribute.
public void setAttribute(String name, Object value, boolean notify) {
checkBackingCacheAvailable();
synchronized (this.changeLock) {
// Serialize the value
byte[] serializedValue = serialize(value);
// Store the attribute locally
if (this.preferDeserializedForm) {
super.setAttribute(name, value, true);
} else {
super.setAttribute(name, serializedValue, true);
}
if (serializedValue == null) {
return;
}
// Create the update attribute message
DeltaSessionAttributeEvent event = new DeltaSessionUpdateAttributeEvent(name, serializedValue);
queueAttributeEvent(event, true);
// Distribute the update
if (!isCommitEnabled()) {
putInRegion(getOperatingRegion(), true, null);
}
}
}
Aggregations