All Questions
215 questions
0
votes
0
answers
16
views
DataDog Trace Analytics Not triggering alerts with URLParam and type GET while same working for POST
I have a use case requiring a URL query string to trigger an alert. As part of the API requests, the parameter longrun=1 is being sent.
Created trace analytics monitor with GET type as below
@http....
0
votes
1
answer
77
views
set libgdx screen resolution to 1920X1080 when starting game
How do I set the screen resolution when starting my game.
Would like when the game starts to change the screen resolution to 1920x1080 (Full HD).
I'm slowly looking stupid...
I noticed that it doesn't ...
0
votes
1
answer
713
views
How to monitor Kafka client with Prometheus exporter
I'm using Prometheus to collect metrics on my application which is written in Java 8 (without Spring).
I use Kafka Stream to read and Kafka Producer to publish.
I want to expose metrics on Kafka ...
0
votes
1
answer
1k
views
Locking with synchronized block vs Explicit Locking
I implemented a barrier in java using synchronized block and got IllegalMonitorStateException. On replacing that synchronized block with explicit locking with lock.lock() and lock.unlock() in await ...
1
vote
1
answer
35
views
How can a thread attempt to call the wait() method in a monitor it doesnt own the lock of (thus throwing IllegalMonitorStateException)
To my understanding, the thread needs to own the lock to even enter the synchronized block with the wait() call. How is it possible that it does so without owning the lock?
public synchronized void ...
0
votes
0
answers
202
views
SOCAT command tailing from java app isn't working
Here is my runCommand that takes Linux command input as a string
public static ArrayList<String> runCommand(String command) {
ArrayList<String> arrayList = new ArrayList<>();
...
0
votes
2
answers
104
views
How do I get the dimensions of each individual screen in Java
I need a function that gives me the resolutions of my individual monitors.
I do know that Toolkit.getDefaultToolkit().getScreenSize() gives me the cumulative resolution of all monitors, but to limit ...
0
votes
2
answers
597
views
Simple CompletableFuture.supplyAsync() leads to IllegalMonitorStateException error
I'm trying this in java8:
public static void main(String[] args) throws Exception {
CompletableFuture<Integer> future = CompletableFuture.supplyAsync(
() -> { return 911; });
...
0
votes
1
answer
594
views
Make FileAlterationListenerAdaptor.onFileCreate() always single thread, apache.commons.io.monitor
I'm overriding the onFileCreate() method of the org.apache.commons.io.monitor.FileAlterationListener interface.
The method works, but I found that sometimes it spawns two threads and I don't fully ...
0
votes
0
answers
98
views
Illegal Monitor Exception in Reentrant lock
I have a java class that contains a array list and acting like a buffer
on the other hand i have a publisher that I do not want to create new data after the buffer is full and have to wait for the ...
2
votes
0
answers
95
views
JClouds: Multiple threads BLOCKED on object monitor owned by thread waiting in pool for work to do
It doesn't seem possible in Java for this scenario to occur, but here's what I'm seeing in a jstack dump of a deadlocked process:
"clrd-normalpri-13" Id=165 BLOCKED on java.text....
0
votes
2
answers
402
views
Monitor/Java synchronized methods, how to schedule an activity in a non-blocking way?
So, basically the whole idea is that I have to simulate the entrance of a school. N students queue at four turnstiles and then they join a random classroom. When the first student joins that classroom ...
0
votes
0
answers
129
views
Java synchronized methods/monitors, if a method acquires the lock, does it keep it until the method ends?
I'll try to be as short as possible. I'm studying monitors at university and we described a model to implement it through semaphores. The way we modeled it if a thread entered a method f from a ...
1
vote
2
answers
147
views
Locking on static final object attribute vs locking code based on class type
I'm seeing some multithreading issues when running safe1 method here :
public class Test {
private static final Object lock = new Object();
public void safe1() {
//Some non ...
0
votes
1
answer
194
views
if thread does not lose ownership of any monitors, could it lead other running thread blocked
In Thread.sleep() JavaDoc, it stated that:
Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds, subject to the precision and accuracy ...