org.pdfsam.guiclient.business
Class IdManager

java.lang.Object
  extended by org.pdfsam.guiclient.business.IdManager

public class IdManager
extends java.lang.Object

singleton to generates a unique id

Author:
Andrea Vacondio

Method Summary
 void cancelExecution(long id)
          Threads with the given id wont generate thumbnails
 java.lang.Object clone()
           
static IdManager getInstance()
           
 long getNewId()
           
 boolean isCancelledExecution(long id)
           
 void removeCancelledExecution(long id)
          remove a cancelled execution id from the table
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static IdManager getInstance()

getNewId

public long getNewId()
Returns:
a newly generated id

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

cancelExecution

public void cancelExecution(long id)
Threads with the given id wont generate thumbnails

Parameters:
id -

isCancelledExecution

public boolean isCancelledExecution(long id)
Parameters:
id -
Returns:
true if the execution is cancelled

removeCancelledExecution

public void removeCancelledExecution(long id)
remove a cancelled execution id from the table

Parameters:
id -