Add missing @Override

This commit is contained in:
Vedran Pavic
2017-10-27 08:33:45 +02:00
parent 5df555cd53
commit f8583bb02f
49 changed files with 273 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ public class SessionEventRegistry implements ApplicationListener<AbstractSession
private Map<String, AbstractSessionEvent> events = new HashMap<>();
private ConcurrentMap<String, Object> locks = new ConcurrentHashMap<>();
@Override
public void onApplicationEvent(AbstractSessionEvent event) {
String sessionId = event.getSessionId();
this.events.put(sessionId, event);

View File

@@ -126,9 +126,11 @@ public class HazelcastSessionRepository implements
private ApplicationEventPublisher eventPublisher = new ApplicationEventPublisher() {
@Override
public void publishEvent(ApplicationEvent event) {
}
@Override
public void publishEvent(Object event) {
}
@@ -192,6 +194,7 @@ public class HazelcastSessionRepository implements
this.hazelcastFlushMode = hazelcastFlushMode;
}
@Override
public HazelcastSession createSession() {
HazelcastSession result = new HazelcastSession();
if (this.defaultMaxInactiveInterval != null) {
@@ -201,6 +204,7 @@ public class HazelcastSessionRepository implements
return result;
}
@Override
public void save(HazelcastSession session) {
if (!session.getId().equals(session.originalId)) {
this.sessions.remove(session.originalId);
@@ -213,6 +217,7 @@ public class HazelcastSessionRepository implements
}
}
@Override
public HazelcastSession findById(String id) {
MapSession saved = this.sessions.get(id);
if (saved == null) {
@@ -225,10 +230,12 @@ public class HazelcastSessionRepository implements
return new HazelcastSession(saved);
}
@Override
public void deleteById(String id) {
this.sessions.remove(id);
}
@Override
public Map<String, HazelcastSession> findByIndexNameAndIndexValue(
String indexName, String indexValue) {
if (!PRINCIPAL_NAME_INDEX_NAME.equals(indexName)) {
@@ -244,6 +251,7 @@ public class HazelcastSessionRepository implements
return sessionMap;
}
@Override
public void entryAdded(EntryEvent<String, MapSession> event) {
if (logger.isDebugEnabled()) {
logger.debug("Session created with id: " + event.getValue().getId());
@@ -251,6 +259,7 @@ public class HazelcastSessionRepository implements
this.eventPublisher.publishEvent(new SessionCreatedEvent(this, event.getValue()));
}
@Override
public void entryEvicted(EntryEvent<String, MapSession> event) {
if (logger.isDebugEnabled()) {
logger.debug("Session expired with id: " + event.getOldValue().getId());
@@ -259,6 +268,7 @@ public class HazelcastSessionRepository implements
.publishEvent(new SessionExpiredEvent(this, event.getOldValue()));
}
@Override
public void entryRemoved(EntryEvent<String, MapSession> event) {
if (logger.isDebugEnabled()) {
logger.debug("Session deleted with id: " + event.getOldValue().getId());
@@ -300,57 +310,69 @@ public class HazelcastSessionRepository implements
this.originalId = cached.getId();
}
@Override
public void setLastAccessedTime(Instant lastAccessedTime) {
this.delegate.setLastAccessedTime(lastAccessedTime);
this.changed = true;
flushImmediateIfNecessary();
}
@Override
public boolean isExpired() {
return this.delegate.isExpired();
}
@Override
public Instant getCreationTime() {
return this.delegate.getCreationTime();
}
@Override
public String getId() {
return this.delegate.getId();
}
@Override
public String changeSessionId() {
this.changed = true;
return this.delegate.changeSessionId();
}
@Override
public Instant getLastAccessedTime() {
return this.delegate.getLastAccessedTime();
}
@Override
public void setMaxInactiveInterval(Duration interval) {
this.delegate.setMaxInactiveInterval(interval);
this.changed = true;
flushImmediateIfNecessary();
}
@Override
public Duration getMaxInactiveInterval() {
return this.delegate.getMaxInactiveInterval();
}
@Override
public <T> T getAttribute(String attributeName) {
return this.delegate.getAttribute(attributeName);
}
@Override
public Set<String> getAttributeNames() {
return this.delegate.getAttributeNames();
}
@Override
public void setAttribute(String attributeName, Object attributeValue) {
this.delegate.setAttribute(attributeName, attributeValue);
this.changed = true;
flushImmediateIfNecessary();
}
@Override
public void removeAttribute(String attributeName) {
this.delegate.removeAttribute(attributeName);
this.changed = true;

View File

@@ -37,6 +37,7 @@ public class PrincipalNameExtractor extends ValueExtractor<MapSession, String> {
private static final PrincipalNameResolver PRINCIPAL_NAME_RESOLVER =
new PrincipalNameResolver();
@Override
@SuppressWarnings("unchecked")
public void extract(MapSession target, String argument,
ValueCollector collector) {

View File

@@ -70,6 +70,7 @@ public class HazelcastHttpSessionConfiguration extends SpringHttpSessionConfigur
return sessionRepository;
}
@Override
public void setImportMetadata(AnnotationMetadata importMetadata) {
Map<String, Object> enableAttrMap = importMetadata
.getAnnotationAttributes(EnableHazelcastHttpSession.class.getName());