Archives par mot-clé : java

HashMap and ConcurrentHashMap Microbenchmark

Is ConcurrentHashMap always faster than HashMap for concurrent access ? If the map is accessible by concurrent threads, ConcurrentHashMap without additional synchronization mechanisms is often enough for reading operations. We may have some delay in the returned values by the … Continuer la lecture

Publié dans benchmark, java, map, microbenchmark, performance en JAVA | Marqué avec | Laisser un commentaire

Design Pattern : decorator implementation in Java

The source code of design patterns can be viewed and downloaded here : https://github.com/ebundy/java-examples/tree/master/design-patterns What is it ? The decorator design pattern is a structural pattern.It allows to design a class to decorate another class in a dynamic way. Decorator is … Continuer la lecture

Publié dans design pattern, java | Marqué avec , , | Laisser un commentaire

Create a trading application in Java (4/15) – Task : Define applicative layers

Our model design will be based on three application layers: – A graphical layer (presentation) – A business service layer (logic) – A data access layer (data) The data access layer will be both used by the service layer and … Continuer la lecture

Publié dans trading | Marqué avec , | Laisser un commentaire

Task: Go from domain model to business design model

We will turn our conceptual model in business design model (classes) that we will illustrate by a business class diagram.  From this diagram, we could create raw Java classes of entities. 1) Go from domain model to business design model … Continuer la lecture

Publié dans trading | Marqué avec , | Laisser un commentaire

Create a trading application in Java (3/15) – Task : Design the conceptual model

From the identified use cases and  basic trading knowledge, we will describe the conceptual model. In RUP (Rational Unified Process), we speak about « domain model ». Warning: the conceptual model is not a software components model. It is primarily a domain … Continuer la lecture

Publié dans trading | Marqué avec , | Laisser un commentaire

Create a trading application in Java (6/15) – Task : Define where stored data

Let ${myVar} stands for a variable named myVar (it’s the Maven template for inlining Maven variables ). We will allow users application to define the data root directory. So, let ${app.base.dir}, a variable representing the directory you chose as the … Continuer la lecture

Publié dans trading | Marqué avec , | Laisser un commentaire