Skip to main content

All Questions

Filter by
Sorted by
Tagged with
2 votes
2 answers
146 views

A thread-safe performant Money Transfer API in Java

This is a popular interview question. It is meant to be done within 30 minutes. The task is to implement a thread-safe performant Bank Account API that allows to transfer, deposit, withdraw and check ...
Sasha Shpota's user avatar
3 votes
0 answers
71 views

Concurrency control between a non-blocking and a blocking methods

In this program, there is a list of Holders that is managed by a singleton class. Each of the Holders keeps a copy of the ...
user1589188's user avatar
3 votes
2 answers
2k views

Enforce execution order with collections of CompleteableFuture's

I receive a message that contains a collection of items that need to be processed. Processing each item involves sequential calls to various services. The services return a ...
Magnus's user avatar
  • 131
1 vote
1 answer
85 views

Synchronize different tasks (I/O listening daemon, prompt scheduler, output etc)

Shortly, I need to create a Java application with client/server architecture (clients represent some sort of math functions and when they are done computing, server consumes these values and produces ...
scame's user avatar
  • 13
6 votes
3 answers
367 views

URLEncoder implementation

I'm looking for feedback on my URLEncoder implementation, which is a drop-in replacement for Apache Tomcat's URLEncoder. It was ...
Svetlin Zarev's user avatar
3 votes
0 answers
83 views

Methods to add and check elements in a Bloom Filter

I have a working Java implementation of Bloom Filter. These are the methods to addElement and check for an element. ...
sriram manoj's user avatar
6 votes
0 answers
816 views

Pseudo-parallel depth-first search

I'm writing a small program that generates a file containing an adjancency matrix, it then reads from that file, constructs a graph and does something like a parallel depth-first search (dfs) on it. ...
user3719857's user avatar
4 votes
1 answer
83 views

Multiple Persons enter room simultaneously and exits after specific interval of time

Here is the link to git repo of my application I am currently implementing just to have better understanding of OOP as well as learning Concurrency (Atleast a try :D) What is the whole ...
SSC's user avatar
  • 501
5 votes
2 answers
2k views

Serialize/deserialize objects to and from database concurrently

I have a class which runs as spring bean in the container and its purpose is data persistence. In the overriden method ...
madteapot's user avatar
  • 195
0 votes
2 answers
113 views

Replacing Synchronization with Atomics

I have tried to make modification in below specified code by removing synchronized and replacing Integer with AtomicInteger . ...
Shweta Aggarwal's user avatar
2 votes
1 answer
1k views

Optimizing code using semaphore to control Netty channel pool - Part 2

Please have a look at my original question: Optimizing code using semaphore to control Netty channel pool I have made some changes as pointed out by @rolfl The new code is as follows. Is this better?...
gladiator's user avatar
  • 151
2 votes
1 answer
831 views

Optimizing code using semaphore to control Netty channel pool

I am using Netty to exchange messages between a client and server. For this, I am maintaining a channel pool on client side. Please help me in optimizing this code. ...
gladiator's user avatar
  • 151
1 vote
2 answers
3k views

Large arrays make runtime very slow

So I have the following code that takes the input of two arrays, and apply some queries to match elements from DBpediaClassesArray with elements from ...
callback's user avatar
  • 199