Search:

Type: Posts; User: r0x

Search: Search took 0.15 seconds.

  1. Replies
    9
    Views
    2,038

    Re: can't use the file declared in other thread

    ok, I have the method modify in Wiki class


    public synchronized void modify(String fileName, String newContent) throws Exception
    {
    if(!repository.containsKey(fileName))
    throw new...
  2. Replies
    9
    Views
    2,038

    Re: can't use the file declared in other thread

    ok thank you all for replies but is any solution to my question ?
    how user2 can access file1 and modify it concurrently with user1 ?
  3. Replies
    9
    Views
    2,038

    Re: can't use the file declared in other thread

    import java.io.File;
    import java.util.Calendar;

    @SuppressWarnings("serial")
    public class TxtFile extends File implements Cloneable
    {

    //Name of File
    private String fileName;
    //Code
  4. Replies
    9
    Views
    2,038

    Re: can't use the file declared in other thread

    ok, I can declare file variables even before user1 thread and it will be accessible by user2 BUT it would mean that user1 didn't create any files, and I want that user1 creates file1 & file2 inside...
  5. Replies
    9
    Views
    2,038

    can't use the file declared in other thread

    Hello, I'm stuck a little bit with the following code. What I want is that user2 is able to modify as well the file1, so that was the point of the exercise to show efficient concurrent access to the...
Results 1 to 5 of 5