Questions tagged [data-persistence]
256 questions
40
votes
8 answers
Disk based HashMap
Does Java have (or is there a library available) that allows me to have a disk based HashMap? It doesn't need to be atomic or anything, but it will be accessed via multiple threads and shouldn't crash if two are accessing the same element at the…

synic
- 26,359
- 20
- 111
- 149
17
votes
7 answers
How to dynamically add Entity in Hibernate?
I'm a java developer. I'm using spring 4.0.1 and hibernate 4.2.21. I have a class as follow:
@Entity
@Inheritance(...)
public abstract class Feature{
@Id
@GeneratedValue
protected Long id;
...
}
Now I have some many class as follow: …

Morteza Malvandi
- 1,656
- 7
- 30
- 73
15
votes
1 answer
Kubernetes persistent volume: hostpath vs local and data persistence
What is the main difference between hostpath and local persistent volume in Kubernetes?
Assuming I have a kubernetes cluster running on my machine with a pod running a database that uses a local persistent volume to save data, if the whole cluster…

Marco
- 151
- 1
- 1
- 4
15
votes
2 answers
Saving Array with NSCoding
I have a small app that has a few saving functionalities. I have a data model class called: Closet:
class Department: NSObject, NSCoding {
var deptName = ""
var managerName = ""
var Task: [Assignment]? // <----- assignment class is in…

Amit
- 310
- 1
- 3
- 15
13
votes
5 answers
After how many seconds are file system write buffers typically flushed?
Before overwriting data in a file, I would like to be pretty sure the old data is stored on disk. It's potentially a very big file (multiple GB), so in-place updates are needed. Usually writes will be 2 MB or larger (my plan is to use a block size…

Thomas Mueller
- 48,905
- 14
- 116
- 132
11
votes
4 answers
Super light weight java persistence layer needed
I need a super light weight persistence layer for a java app I'm writing. I need it to be a stand alone app and so far I've played with Ammentos & Persistence4J. I like them both (especially Ammentos) but I cannot find much on it on the web and…

Nefsu
- 418
- 1
- 5
- 16
11
votes
2 answers
How to model in Java EE?
Let's say, I have decided to go with Java EE stack for my enterprise application.
Now, for domain modelling (or: for designing the M of MVC), which APIs can I safely assume and use, and which I should stay away from... say, via a layer of…

Harry
- 3,684
- 6
- 39
- 48
11
votes
1 answer
A data persistence library for AngularJs
There is an alpha for Ember Js and also Persistence. Is there something similar for AngularJs (or it is in plan)?
Maybe there is something that is framework independent?
What I need is actual library which enables these:
To define my object…

Andrej Kaurin
- 11,592
- 13
- 46
- 54
8
votes
2 answers
Can an entity class work without having a definition for all columns of the table
I implemented database querying for a table using jpa. I have added a new column in database for the table and completed my coding.
If after some time the deployment got reverted, consider I added a activeFlag column and it needs to be removed from…

kjkszpj
- 81
- 1
- 1
- 4
7
votes
2 answers
What available Python modules are there to save-and-load data?
There are many scattered posts out on StackOverflow, regarding Python modules used to save and load data.
I myself am familiar with json and pickle and I have heard of pytables too. There are probably more out there. Also, each module seems to fit…

neydroydrec
- 6,973
- 9
- 57
- 89
7
votes
3 answers
Perl: does reassigning a new value to a scalar overwrite its current contents in RAM?
I'm using Perl for a security-related task and am wondering when a statement such as:
$test = "new value"
is executed, is the old value that $test created overwritten in RAM?
If not, is there a way to force that to happen?

LawrenceC
- 423
- 2
- 13
7
votes
1 answer
Data Persistence in Microsoft Orleans
I'm new in Microsoft Orleans and when reading the documentation I found this :
... Grain persistence uses an extensible plugin model so that storage providers for any database can be used. This persistence model is designed for simplicity and is…

RTK
- 223
- 1
- 6
7
votes
3 answers
Google Colab: "Unable to connect to the runtime" after uploading Pytorch model from local
I am using a simple (not necessarily efficient) method for Pytorch model saving.
import torch
from google.colab import files
torch.save(model, filename) # save a trained model on the VM
files.download(filename) # download the model to…

Francis
- 6,416
- 5
- 24
- 32
7
votes
2 answers
How to store Linked Tree with children in Relational Database?
I have a custom LinkedTree with children (nodes), and nodes has an adjacency relationship, i.e. each node linked with previous and next one. This LinkedTree is very heavy, big, it may consist of millions of nodes.
And here is a code sample:
package…

Ste7
- 119
- 8
7
votes
1 answer
Liferay: Difference between DLFileEntryLocalServiceUtil and DLAppLocalServiceUtil?
What is the difference between this services?
DLFileEntryLocalServiceUtil
and
DLAppLocalServiceUtil
When should we use one and when the other? Is DLAppLocal a new interface in Liferay 6.1 which discourages the old DLFileEntry for application level…

Whimusical
- 6,401
- 11
- 62
- 105