Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Check if a file exists every 5 seconds in Spring?

Posted on 2011-04-18
3
Medium Priority
?
428 Views
Last Modified: 2012-05-11
What was the good and simple practice in Spring when you want to periodically check for a flag file in a certain directory? i.e. if there is that flag file, pause for 5 seconds and check again; If there is no flag file, then proceed to next step. I think we could use Thread.sleep or Timer, but still want to get some expert answer on any simple solution. Thanks!
0
Comment
Question by:heyday2004
3 Comments
 
LVL 26

Assisted Solution

by:ksivananth
ksivananth earned 664 total points
ID: 35421819
timer seems good option!
0
 
LVL 92

Accepted Solution

by:
objects earned 668 total points
ID: 35421825
0
 
LVL 20

Assisted Solution

by:Sathish David Kumar N
Sathish David  Kumar N earned 668 total points
ID: 35430927
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses
Course of the Month21 days, 2 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question