문제

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

도움이 되었습니까?

해결책

you can use sqlite, which has hooks to a lot of languages.

the default use for sqlite is for file-based, but it can easily be used in-memory.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top