org.wildfly.clustering.session.cache.user.UserContextEntry Maven / Gradle / Ivy
/*
- * Copyright The WildFly Authors
* SPDX-License-Identifier: Apache-2.0
*/
package org.wildfly.clustering.session.cache.user;
import org.wildfly.clustering.server.util.Supplied;
/**
* Cache entry that stores persistent and transient user context.
* @author Paul Ferraro
* @param the persistent user context type
* @param the transient user context type
*/
public class UserContextEntry implements UserContext {
private final C persistentContext;
private final Supplied transientContext = Supplied.cached();
public UserContextEntry(C persistentContext) {
this.persistentContext = persistentContext;
}
@Override
public C getPersistentContext() {
return this.persistentContext;
}
@Override
public Supplied getTransientContext() {
return this.transientContext;
}
}