use of org.wildfly.clustering.web.cache.session.SessionCreationMetaDataEntry in project wildfly by wildfly.
the class HotRodSessionMetaDataFactory method createSessionMetaData.
@Override
public InvalidatableSessionMetaData createSessionMetaData(String id, CompositeSessionMetaDataEntry<L> entry) {
boolean newSession = entry.getCreationMetaData().isNew();
SessionCreationMetaDataKey creationMetaDataKey = new SessionCreationMetaDataKey(id);
Mutator creationMutator = this.properties.isTransactional() && newSession ? Mutator.PASSIVE : this.creationMetaDataMutatorFactory.createMutator(creationMetaDataKey, new SessionCreationMetaDataEntry<>(entry.getCreationMetaData(), entry.getLocalContext()));
SessionCreationMetaData creationMetaData = new MutableSessionCreationMetaData(entry.getCreationMetaData(), creationMutator);
SessionAccessMetaDataKey accessMetaDataKey = new SessionAccessMetaDataKey(id);
Mutator accessMutator = this.properties.isTransactional() && newSession ? Mutator.PASSIVE : this.accessMetaDataMutatorFactory.createMutator(accessMetaDataKey, entry.getAccessMetaData());
SessionAccessMetaData accessMetaData = new MutableSessionAccessMetaData(entry.getAccessMetaData(), accessMutator);
return new CompositeSessionMetaData(creationMetaData, accessMetaData);
}
use of org.wildfly.clustering.web.cache.session.SessionCreationMetaDataEntry in project wildfly by wildfly.
the class HotRodSessionMetaDataFactory method createValue.
@Override
public CompositeSessionMetaDataEntry<L> createValue(String id, Void context) {
SessionCreationMetaDataEntry<L> creationMetaDataEntry = new SessionCreationMetaDataEntry<>(new SimpleSessionCreationMetaData());
SessionAccessMetaData accessMetaData = new SimpleSessionAccessMetaData();
this.creationMetaDataMutatorFactory.createMutator(new SessionCreationMetaDataKey(id), creationMetaDataEntry).mutate();
this.accessMetaDataMutatorFactory.createMutator(new SessionAccessMetaDataKey(id), accessMetaData).mutate();
return new CompositeSessionMetaDataEntry<>(creationMetaDataEntry, accessMetaData);
}
Aggregations