@Test public void testDelete() { System.out.println("delete"); MongoDBSessionDataStorage instance = new MongoDBSessionDataStorage(mongoClient.getDatabase(DATABASE_NAME)); SessionData sessionData = instance.create(); String sessionId = sessionData.getId(); sessionData.put(KEY, VALUE); instance.save(sessionData); instance.delete(sessionId); SessionData deleted = instance.get(sessionId); assertNull(deleted); }
@Override public void delete(String sessionId) { this.sessions.deleteOne(eq(SESSION_ID, sessionId)); }
MongoDBSessionDataStorage implements SessionDataStorage { @Override public void delete(String sessionId) { this.sessions.deleteOne(eq(SESSION_ID, sessionId)); } }
MongoDBSessionDataStorage implements SessionDataStorage { @Override public void delete(String sessionId) { this.sessions.deleteOne(eq(SESSION_ID, sessionId)); } MongoDBSessionDataStorage(MongoDatabase database);  MongoDBSessionDataStorage(MongoDatabase database, int idleTime);  MongoDBSessionDataStorage(MongoDatabase database, String collection);  MongoDBSessionDataStorage(MongoDatabase database, String collection, long idleTime, SessionDataTranscoder transcoder); }
MongoDBSessionDataStorage implements SessionDataStorage { @Override public void delete(String sessionId) { this.sessions.deleteOne(eq(SESSION_ID, sessionId)); } MongoDBSessionDataStorage(MongoDatabase database);  MongoDBSessionDataStorage(MongoDatabase database, int idleTime);  MongoDBSessionDataStorage(MongoDatabase database, String collection);  MongoDBSessionDataStorage(MongoDatabase database, String collection, long idleTime, SessionDataTranscoder transcoder); @Override SessionData create(); @Override void save(SessionData sessionData); @Override SessionData get(String sessionId); @Override void delete(String sessionId); }
MongoDBSessionDataStorage implements SessionDataStorage { @Override public void delete(String sessionId) { this.sessions.deleteOne(eq(SESSION_ID, sessionId)); } MongoDBSessionDataStorage(MongoDatabase database);  MongoDBSessionDataStorage(MongoDatabase database, int idleTime);  MongoDBSessionDataStorage(MongoDatabase database, String collection);  MongoDBSessionDataStorage(MongoDatabase database, String collection, long idleTime, SessionDataTranscoder transcoder); @Override SessionData create(); @Override void save(SessionData sessionData); @Override SessionData get(String sessionId); @Override void delete(String sessionId);  }