Reputation: 11201
I have a client requirement of not to use an RDBMS, but instead do everything using in-memory data-structures If the server is restarted then the application state will revert to the last state saved.
I don't have any idea of using in-memory data , I used to work with MySQL ,but not in memory If anyone could please guide me a bit about this , any tutorial or something
Below are some examples ...
public Object save(Object object, Class c) {
database.ofy().put(object);
return object;
}
public void delete(Long id, Class c) {
database.ofy().delete(c, id);
}
public Object findById(String id, Class c) {
return database.ofy().find(c, id);
}
public Iterable<Object> findAll(Class c) {
Iterable<Object> models = database.ofy().query(c).fetch();
return models;
}
}
Thanks
Upvotes: 1
Views: 4944