org.eclipse.core.internal.utils
Class StringPoolJob

java.lang.Object
  extended by org.eclipse.core.runtime.PlatformObject
      extended by org.eclipse.core.internal.jobs.InternalJob
          extended by org.eclipse.core.runtime.jobs.Job
              extended by org.eclipse.core.internal.utils.StringPoolJob
All Implemented Interfaces:
java.lang.Comparable, org.eclipse.core.runtime.IAdaptable

public class StringPoolJob
extends org.eclipse.core.runtime.jobs.Job

Performs string sharing passes on all string pool participants registered with the platform.


Field Summary
 
Fields inherited from class org.eclipse.core.runtime.jobs.Job
ASYNC_FINISH, BUILD, DECORATE, INTERACTIVE, LONG, NONE, RUNNING, SHORT, SLEEPING, WAITING
 
Constructor Summary
StringPoolJob()
           
 
Method Summary
 void addStringPoolParticipant(IStringPoolParticipant participant, org.eclipse.core.runtime.jobs.ISchedulingRule rule)
          Adds a string pool participant.
 void removeStringPoolParticipant(IStringPoolParticipant participant)
          Removes the indicated log listener from the set of registered string pool participants.
 
Methods inherited from class org.eclipse.core.runtime.jobs.Job
addJobChangeListener, belongsTo, cancel, done, getJobManager, getName, getPriority, getProperty, getResult, getRule, getState, getThread, isBlocking, isSystem, isUser, join, removeJobChangeListener, schedule, schedule, setName, setPriority, setProgressGroup, setProperty, setRule, setSystem, setThread, setUser, shouldRun, shouldSchedule, sleep, wakeUp, wakeUp
 
Methods inherited from class org.eclipse.core.internal.jobs.InternalJob
compareTo, toString
 
Methods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapter
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Constructor Detail

StringPoolJob

public StringPoolJob()
Method Detail

addStringPoolParticipant

public void addStringPoolParticipant(IStringPoolParticipant participant,
                                     org.eclipse.core.runtime.jobs.ISchedulingRule rule)
Adds a string pool participant. The job periodically builds a string pool and asks all registered participants to share their strings in the pool. Once all participants have added their strings to the pool, the pool is discarded to avoid additional memory overhead. Adding a participant that is equal to a participant already registered will replace the scheduling rule associated with the participant, but will otherwise be ignored.

Parameters:
participant - The participant to add
rule - The scheduling rule that must be owned at the time the participant is called. This allows a participant to protect their data structures against access at unsafe times.
Since:
3.1
See Also:
removeStringPoolParticipant(IStringPoolParticipant)

removeStringPoolParticipant

public void removeStringPoolParticipant(IStringPoolParticipant participant)
Removes the indicated log listener from the set of registered string pool participants. If no such participant is registered, no action is taken.

Parameters:
participant - the participant to deregister
Since:
3.1
See Also:
addStringPoolParticipant(IStringPoolParticipant, ISchedulingRule)