站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

SegmentCache (Editor Library) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.editor.lib/1 1.14.0 3

org.netbeans.editor
Class SegmentCache

java.lang.Object
  extended by org.netbeans.editor.SegmentCache

Deprecated. The caching is no longer performed as the object creation in the present JVMs is fast. Simply use new Segment().

public class SegmentCache
extends Object

This class caches instances of Segment to prevent excessive object creation.


Constructor Summary
SegmentCache()
          Deprecated. Constructs SegmentCache instance.
 
Method Summary
 Segment getSegment()
          Deprecated. Simply returns new Segment().
static SegmentCache getSharedInstance()
          Deprecated. Simply use new Segment().
 void releaseSegment(Segment segment)
          Deprecated. Does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SegmentCache

public SegmentCache()
Deprecated. 
Constructs SegmentCache instance.

Method Detail

getSharedInstance

public static SegmentCache getSharedInstance()
Deprecated. Simply use new Segment().

Returns:
shared cache instance.

getSegment

public Segment getSegment()
Deprecated. Simply returns new Segment().

Returns:
A free Segment. When done, the segment should be recycled by invoking #releaseSegment().

releaseSegment

public void releaseSegment(Segment segment)
Deprecated. Does nothing.

Releases a shared Segment.
The shared segment must NOT be used after it's released.
The shared segment must NOT be released more than once like this:
   segmentCache.releaseSegment(segment);
   segmentCache.releaseSegment(segment);
 

Only the segments obtained from getSegment() can be released.

Parameters:
segment - segment to be released.

org.netbeans.modules.editor.lib/1 1.14.0 3

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.