public class PersistenceDerby extends Object implements Persistence
Constructor and Description |
---|
PersistenceDerby() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkUser(String id)
Check if a user is already persisted with an associated password pair.
|
boolean |
checkUserPWD(String id,
String pwd)
Method that checks the proper authentication of a persisted user-password
pair.
|
void |
init(ModuleContext context) |
void |
removeCallee(String space,
String subid) |
void |
removeCaller(String space,
String subid) |
void |
removeOlderThan(Long millis)
Maintenance method that removes all stored data from all tables that was
introduced more than @param millis ago.
|
void |
removePublisher(String space,
String subid) |
void |
removeSpace(String s) |
void |
removeSubscriber(String space,
String subid) |
void |
restore()
Restore in the MW all the persisted information (registration,
subscribers and callees)
|
void |
storeCallee(String space,
Callee c) |
void |
storeCaller(String space,
Caller c) |
void |
storePublisher(String space,
Publisher p) |
void |
storeSpace(Space s,
String v) |
void |
storeSubscriber(String space,
Subscriber s) |
void |
storeUserPWD(String id,
String pwd)
Store a new user-password pair for later authentication.
|
public void init(ModuleContext context)
init
in interface Persistence
public void storeSpace(Space s, String v)
storeSpace
in interface Persistence
public void storeSubscriber(String space, Subscriber s)
storeSubscriber
in interface Persistence
public void removeSubscriber(String space, String subid)
removeSubscriber
in interface Persistence
public void storePublisher(String space, Publisher p)
storePublisher
in interface Persistence
public void removePublisher(String space, String subid)
removePublisher
in interface Persistence
public void storeCaller(String space, Caller c)
storeCaller
in interface Persistence
public void removeCaller(String space, String subid)
removeCaller
in interface Persistence
public void storeCallee(String space, Callee c)
storeCallee
in interface Persistence
public void removeCallee(String space, String subid)
removeCallee
in interface Persistence
public void removeSpace(String s)
removeSpace
in interface Persistence
public void restore()
Persistence
restore
in interface Persistence
public void storeUserPWD(String id, String pwd)
Persistence
storeUserPWD
in interface Persistence
id
- Userpwd
- Passwordpublic boolean checkUserPWD(String id, String pwd)
Persistence
checkUserPWD
in interface Persistence
id
- Userpwd
- Passwordpublic boolean checkUser(String id)
Persistence
checkUser
in interface Persistence
id
- to checkpublic void removeOlderThan(Long millis)
millis
- Minimum age, in milliseconds, at which the data will be
removed (data older than this will be removed)Copyright © 2018 universAAL Consortium. All rights reserved.