Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update creating mechanism. #1

Merged
merged 11 commits into from
Sep 9, 2014
Merged

Update creating mechanism. #1

merged 11 commits into from
Sep 9, 2014

Conversation

yusufaytas
Copy link
Contributor

Creation mechanism for IvoryTower is updated.

@yusufaytas yusufaytas closed this Sep 6, 2014
@yusufaytas yusufaytas reopened this Sep 6, 2014
test dependency is added.
fixed the issue with class creation.
@yusufaytas yusufaytas closed this Sep 6, 2014
@yusufaytas yusufaytas reopened this Sep 6, 2014
@yusufaytas
Copy link
Contributor Author

Added double checked locking.


public static IvoryTower getInstance() {
if(instance == null){
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lazy initialization of the object introduces concurrent access problem (the access to the singleton object is not thread safe anymore).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh ok, I can avoid that with locking but it's not super important though. :) I'll skip this update.

@iluwatar
Copy link
Owner

iluwatar commented Sep 7, 2014

The double checked locking pattern looks good.

Can you also provide simple class diagram image (inventory has items)? I've used https://www.genmymodel.com/ for drawing.

Please add pattern description to README.md and link to the class diagram.

@yusufaytas
Copy link
Contributor Author

I'll add the pattern description to README.md as soon as I can :)

@yusufaytas
Copy link
Contributor Author

Ping?

iluwatar added a commit that referenced this pull request Sep 9, 2014
Update creating mechanism.
@iluwatar iluwatar merged commit 106b0b9 into iluwatar:master Sep 9, 2014
iluwatar pushed a commit that referenced this pull request Jan 1, 2016
Generate UML for delegation pattern
iluwatar pushed a commit that referenced this pull request Jan 3, 2016
npathai pushed a commit that referenced this pull request Aug 4, 2016
merging changes into fork from origin
iluwatar pushed a commit that referenced this pull request Jan 13, 2017
#450 Queue-Based-Load-Leveling Blog
iluwatar pushed a commit that referenced this pull request Apr 1, 2017
Update my local repository
iluwatar pushed a commit that referenced this pull request May 15, 2017
iluwatar pushed a commit that referenced this pull request Sep 23, 2017
#348 - Data Tranfer Object : Add Puml id to README.md.
npathai pushed a commit that referenced this pull request Oct 9, 2017
npathai pushed a commit that referenced this pull request May 16, 2018
Bringing fork up-to-date
iluwatar pushed a commit that referenced this pull request Aug 21, 2020
iluwatar pushed a commit that referenced this pull request Oct 10, 2020
wangihzyue added a commit to wangihzyue/java-design-patterns that referenced this pull request May 19, 2021
mahendher pushed a commit to mahendher/java-design-patterns that referenced this pull request Dec 9, 2021
pratigya0 pushed a commit to pratigya0/java-design-patterns that referenced this pull request Aug 3, 2023
pratigya0 pushed a commit to pratigya0/java-design-patterns that referenced this pull request Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants