use of org.wildfly.clustering.web.cache.session.SessionCreationMetaData in project wildfly by wildfly.
the class AbstractInfinispanSessionMetaDataFactory 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.SessionCreationMetaData 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);
}
Aggregations