Reorder overridden SessionRepository methods.
Edit Javadoc.
This commit is contained in:
@@ -18,14 +18,25 @@ package org.springframework.session.data.gemfire.support;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.geode.cache.Region;
|
||||
|
||||
import org.springframework.data.gemfire.GemfireOperations;
|
||||
import org.springframework.session.Session;
|
||||
import org.springframework.session.SessionRepository;
|
||||
import org.springframework.session.data.gemfire.AbstractGemFireOperationsSessionRepository;
|
||||
|
||||
/**
|
||||
* Framework supporting class for {@link AbstractGemFireOperationsSessionRepository} implementations.
|
||||
*
|
||||
* By default, all {@link SessionRepository} data access operations throw an {@link UnsupportedOperationException}.
|
||||
* Therefore, you are free to implement only the {@link SessionRepository} data access operations you need.
|
||||
*
|
||||
* For instance, if you only want to implement a {@literal read-only} {@link SessionRepository}, then you can simply
|
||||
* {@literal override} the {@link #findById(String)}, {@link #findByIndexNameAndIndexValue(String, String)}
|
||||
* and {@link #findByPrincipalName(String)} Repository methods. In that way, the {@link Session} can never be updated.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.apache.geode.cache.Region
|
||||
* @see org.springframework.data.gemfire.GemfireOperations
|
||||
* @see org.springframework.session.Session
|
||||
* @see org.springframework.session.data.gemfire.AbstractGemFireOperationsSessionRepository
|
||||
@@ -37,17 +48,26 @@ public abstract class GemFireOperationsSessionRepositorySupport
|
||||
|
||||
private static final String OPERATION_NOT_SUPPORTED = "Operation Not Supported";
|
||||
|
||||
/**
|
||||
* Construct an uninitialized instance of {@link GemFireOperationsSessionRepositorySupport}.
|
||||
*
|
||||
* @see #GemFireOperationsSessionRepositorySupport(GemfireOperations)
|
||||
*/
|
||||
protected GemFireOperationsSessionRepositorySupport() { }
|
||||
|
||||
/**
|
||||
* Constructs a new instance of {@link GemFireOperationsSessionRepositorySupport} initialized with
|
||||
* the given {@link GemfireOperations} object used to perform {@link Region} data access operations
|
||||
* managing the {@link Session} state.
|
||||
*
|
||||
* @param gemfireOperations {@link GemfireOperations} for performing data access operations
|
||||
* on the {@link Region} used to manage {@link Session} state.
|
||||
* @see org.springframework.data.gemfire.GemfireOperations
|
||||
*/
|
||||
public GemFireOperationsSessionRepositorySupport(GemfireOperations gemfireOperations) {
|
||||
super(gemfireOperations);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Session> findByIndexNameAndIndexValue(String indexName, String indexValue) {
|
||||
throw new UnsupportedOperationException(OPERATION_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Session createSession() {
|
||||
throw new UnsupportedOperationException(OPERATION_NOT_SUPPORTED);
|
||||
@@ -63,6 +83,11 @@ public abstract class GemFireOperationsSessionRepositorySupport
|
||||
throw new UnsupportedOperationException(OPERATION_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Session> findByIndexNameAndIndexValue(String indexName, String indexValue) {
|
||||
throw new UnsupportedOperationException(OPERATION_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(Session session) {
|
||||
throw new UnsupportedOperationException(OPERATION_NOT_SUPPORTED);
|
||||
|
||||
Reference in New Issue
Block a user