Search in sources :

Example 1 with SimpleSessionAccessMetaData

use of org.wildfly.clustering.web.cache.session.SimpleSessionAccessMetaData in project wildfly by wildfly.

the class AbstractInfinispanSessionMetaDataFactory method createValue.

@Override
public CompositeSessionMetaDataEntry<L> createValue(String id, Void context) {
    Map<Key<String>, Object> entries = new HashMap<>(3);
    SessionCreationMetaDataEntry<L> creationMetaDataEntry = new SessionCreationMetaDataEntry<>(new SimpleSessionCreationMetaData());
    entries.put(new SessionCreationMetaDataKey(id), creationMetaDataEntry);
    SessionAccessMetaData accessMetaData = new SimpleSessionAccessMetaData();
    entries.put(new SessionAccessMetaDataKey(id), accessMetaData);
    this.writeCache.putAll(entries);
    return new CompositeSessionMetaDataEntry<>(creationMetaDataEntry, accessMetaData);
}
Also used : HashMap(java.util.HashMap) SimpleSessionAccessMetaData(org.wildfly.clustering.web.cache.session.SimpleSessionAccessMetaData) SimpleSessionCreationMetaData(org.wildfly.clustering.web.cache.session.SimpleSessionCreationMetaData) MutableSessionAccessMetaData(org.wildfly.clustering.web.cache.session.MutableSessionAccessMetaData) SimpleSessionAccessMetaData(org.wildfly.clustering.web.cache.session.SimpleSessionAccessMetaData) SessionAccessMetaData(org.wildfly.clustering.web.cache.session.SessionAccessMetaData) Key(org.wildfly.clustering.ee.Key) CompositeSessionMetaDataEntry(org.wildfly.clustering.web.cache.session.CompositeSessionMetaDataEntry) SessionCreationMetaDataEntry(org.wildfly.clustering.web.cache.session.SessionCreationMetaDataEntry)

Example 2 with SimpleSessionAccessMetaData

use of org.wildfly.clustering.web.cache.session.SimpleSessionAccessMetaData 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);
}
Also used : SimpleSessionAccessMetaData(org.wildfly.clustering.web.cache.session.SimpleSessionAccessMetaData) SimpleSessionCreationMetaData(org.wildfly.clustering.web.cache.session.SimpleSessionCreationMetaData) MutableSessionAccessMetaData(org.wildfly.clustering.web.cache.session.MutableSessionAccessMetaData) SimpleSessionAccessMetaData(org.wildfly.clustering.web.cache.session.SimpleSessionAccessMetaData) SessionAccessMetaData(org.wildfly.clustering.web.cache.session.SessionAccessMetaData) CompositeSessionMetaDataEntry(org.wildfly.clustering.web.cache.session.CompositeSessionMetaDataEntry) SessionCreationMetaDataEntry(org.wildfly.clustering.web.cache.session.SessionCreationMetaDataEntry)

Aggregations

CompositeSessionMetaDataEntry (org.wildfly.clustering.web.cache.session.CompositeSessionMetaDataEntry)2 MutableSessionAccessMetaData (org.wildfly.clustering.web.cache.session.MutableSessionAccessMetaData)2 SessionAccessMetaData (org.wildfly.clustering.web.cache.session.SessionAccessMetaData)2 SessionCreationMetaDataEntry (org.wildfly.clustering.web.cache.session.SessionCreationMetaDataEntry)2 SimpleSessionAccessMetaData (org.wildfly.clustering.web.cache.session.SimpleSessionAccessMetaData)2 SimpleSessionCreationMetaData (org.wildfly.clustering.web.cache.session.SimpleSessionCreationMetaData)2 HashMap (java.util.HashMap)1 Key (org.wildfly.clustering.ee.Key)1