I have the following method: 

```
void store(SomeObject o) {  

}  

```

The idea of this method is to store `o` to a permanent storage *but* the function should not block. I.e. I can not/must not do the actual storage in the same thread that called `store`.  

I can not also start a thread and store the object from the other thread because `store` might be called a "huge" amount of times and I don't want to start spawning threads.  

So I options which I don't see how they can work well:  

1) Use a thread pool (`Executor` family)  

2) In `store` store the object in an array list and return. When the array list reaches e.g. 1000 (random number) then start another thread to "flush" the array list to storage. But I would still possibly have the problem of too many threads (thread pool?)  

So in both cases the only requirement I have is that I store persistantly the objects in exactly the same order that was passed to `store`. And using multiple threads mixes things up.  

How can this be solved?  

How can I ensure:  

1) Non blocking `store`  

2) Accurate insertion order  

3) I don't care about any storage guarantees. If e.g. something crashes I don't care about losing data e.g. cached in the array list before storing them.