public abstract class AbstractMongoSessionConverter extends Object implements GenericConverter
GenericConverter.ConvertiblePair
Modifier and Type | Field and Description |
---|---|
protected static String |
EXPIRE_AT_FIELD_NAME |
Constructor and Description |
---|
AbstractMongoSessionConverter() |
Modifier and Type | Method and Description |
---|---|
protected abstract MongoSession |
convert(org.bson.Document sessionWrapper) |
protected abstract com.mongodb.DBObject |
convert(MongoSession session) |
Object |
convert(Object source,
TypeDescriptor sourceType,
TypeDescriptor targetType) |
protected void |
ensureIndexes(org.springframework.data.mongodb.core.index.IndexOperations sessionCollectionIndexes)
Method ensures that there is a TTL index on expireAt field.
|
protected String |
extractPrincipal(org.springframework.session.Session expiringSession) |
Set<GenericConverter.ConvertiblePair> |
getConvertibleTypes() |
protected abstract org.springframework.data.mongodb.core.query.Query |
getQueryForIndex(String indexName,
Object indexValue)
Returns query to be executed to return sessions based on a particular index.
|
protected static final String EXPIRE_AT_FIELD_NAME
protected abstract org.springframework.data.mongodb.core.query.Query getQueryForIndex(String indexName, Object indexValue)
indexName
- name of the indexindexValue
- value to query againstprotected void ensureIndexes(org.springframework.data.mongodb.core.index.IndexOperations sessionCollectionIndexes)
sessionCollectionIndexes
- IndexOperations
to useprotected String extractPrincipal(org.springframework.session.Session expiringSession)
public Set<GenericConverter.ConvertiblePair> getConvertibleTypes()
getConvertibleTypes
in interface GenericConverter
public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType)
convert
in interface GenericConverter
protected abstract com.mongodb.DBObject convert(MongoSession session)
protected abstract MongoSession convert(org.bson.Document sessionWrapper)
Copyright © 2014-2018–2019 Pivotal, Inc.. All rights reserved.