Emergency Help is needed

A

anoosh

Hi all
I'm new to java, and want to write a program.
The aim is to create a Supervisor class.This class Supervises the
creation of a thread(repeatedly in a special time in background while
this class is running) and insert the created thread in a thread
pool,and then selecets a one of these threads and also assigns the
selected thread to critical environment.
The thread consists some field,but the most important field is request
field.This field records the last time that this thread send a request
signal to the critical environment for enterence. I mean each of these
thread which stored in the pool must send this request randomly to the
critical environment and record it.
Now would you please write some skeleton of these two
classes(Supervisor and thread) for me?
 
A

Andrew Thompson

anoosh wrote:
...
Now would you please write some skeleton of these two
classes(Supervisor and thread) for me?

As soon as your account is properly set-up, with automatic
billing.

(notices..)
Sub: Emergency Help is needed

Of course, that will require a 150% loading..
 
O

Owen Jacobson

Hi all
I'm new to java, and want to write a program.
The aim is to create a Supervisor class.This class Supervises the
creation of a thread(repeatedly in a special time in background while
this class is running) and insert the created thread in a thread
pool,and then selecets a one of these threads and also assigns the
selected thread to critical environment.
The thread consists some field,but the most important field is request
field.This field records the last time that this thread send a request
signal to the critical environment for enterence. I mean each of these
thread which stored in the pool must send this request randomly to the
critical environment and record it.
Now would you please write some skeleton of these two
classes(Supervisor and thread) for me?

Certainly. My rates start at CAD 150/hr, with a minimum of one
billable week (40 billable hours @ CAD 150/hr), for emergency
consulting.

More seriously (though I am serious, if you're willing to pay those
rates I will absolutely write something matching those vague "specs"),
your emergency is not anyone else's emergency. If you want help, show
us what you've written and ask for help with a specific part, don't
just hand "the internet" some requirements and expect kind-hearted
smart people to fill them. That's what rent-a-coder and elance and so
on are for.
 
A

Andrew Thompson

Hi all
I'm new to ...

Multi-posting? Abusing the help of people
on usenet newsgroups?

Please refrain from multi-posting in future.

In all the time you have been sending this
desperate message across usenet newsgroups,
you might have been *reading* the *textbook*
that you have perhaps been ignoring all semester,
or *coding* the code examples you 'skipped'.

(X-post to c.l.j.p./h., w/ f-u to c.l.j.p. only)
 
M

marcelomorales.name

Hi all
I'm new to java, and want to write a program.
The aim is to create a Supervisor class.This class Supervises the
creation of a thread(repeatedly in a special time in background while
this class is running) and insert the created thread in a thread
pool,and then selecets a one of these threads and also assigns the
selected thread to critical environment.
The thread consists some field,but the most important field is request
field.This field records the last time that this thread send a request
signal to the critical environment for enterence. I mean each of these
thread which stored in the pool must send this request randomly to the
critical environment and record it.
Now would you please write some skeleton of these two
classes(Supervisor and thread) for me?

Isnt't java.util.concurrent usefull?
 
L

Lew

anoosh said:
I'm new to java [sic], and want to write a program.
The aim is to create a Supervisor class.This class Supervises the

Your posts will be a little easier to read if you put two spaces between
sentences.

Also around parenthetical remarks.

Whitespace is not the same as no space.

Commas, too.

Andrew said:
Multi-posting? Abusing the help of people
on usenet newsgroups?

Please refrain from multi-posting in future.

In all the time you have been sending this
desperate message across usenet newsgroups,
you might have been *reading* the *textbook*
that you have perhaps been ignoring all semester,
or *coding* the code examples you 'skipped'.

(X-post to c.l.j.p./h., w/ f-u to c.l.j.p. only)

OP: this problem seems a bit beyond the "new to Java" phase, but you should
definitely read /Java Concurrency in Practice/, by Brian Goetz, et al. It
covers the use of threads, locks, notifications, timers and the lot.

The java.util.Timer class will help you with the timer part.

The java.util.concurrent package contains a number of classes and interfaces
you can use for this, notably Executor, ExecutorService and Future. Also, go
to java.sun.com and read the concurrent programming tutorials.
 
M

Mark Space

Owen said:
Certainly. My rates start at CAD 150/hr, with a minimum of one
billable week (40 billable hours @ CAD 150/hr), for emergency
consulting.


Damn. I need to raise my rates....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top