Java Code Examples for org.openide.util.BaseUtilities#activeReferenceQueue()
The following examples show how to use
org.openide.util.BaseUtilities#activeReferenceQueue() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LuceneIndex.java From netbeans with Apache License 2.0 | 6 votes |
private CleanReference(final RAMDirectory[] dir) { super (dir, BaseUtilities.activeReferenceQueue()); final IndexCacheFactory.RAMController c = IndexCacheFactory.getDefault().getRAMController(); final boolean doHardRef = !c.isFull(); if (doHardRef) { this.hardRef = dir; long _size = dir[0].sizeInBytes(); size.set(_size); c.acquire(_size); } LOGGER.log(Level.FINEST, "Caching index: {0} cache policy: {1}", //NOI18N new Object[]{ folder.getAbsolutePath(), cachePolicy.getSystemName() }); }
Example 2
Source File: APTUtils.java From netbeans with Apache License 2.0 | 5 votes |
public ClassLoaderRef(final ClassLoader cl, final FileObject root, final boolean isModule) { super(cl, BaseUtilities.activeReferenceQueue()); this.timeStamp = getTimeStamp(root); this.rootPath = FileUtil.getFileDisplayName(root); this.isModule = isModule; LOG.log(Level.FINER, "ClassLoader for root {0} created.", new Object[]{rootPath}); //NOI18N }
Example 3
Source File: DeepListener.java From netbeans with Apache License 2.0 | 5 votes |
DeepListener(FileChangeListener listener, File path, FileFilter ff, Callable<Boolean> stop) { super(listener, BaseUtilities.activeReferenceQueue()); this.path = path; this.stop = stop; this.filter = ff; this.hash = 11 * listener.hashCode() + 7 * path.hashCode(); }
Example 4
Source File: TimedWeakReference.java From netbeans with Apache License 2.0 | 5 votes |
/** * Create a weak reference with timeout. * @param o the referent */ public TimedWeakReference(T o) { super(o, BaseUtilities.activeReferenceQueue()); this.o = o; task = RP.create(this); task.schedule(TIMEOUT); }
Example 5
Source File: ClusteredIndexables.java From netbeans with Apache License 2.0 | 5 votes |
public ClearReference( @NonNull final Collection[] data, @NonNull final DocumentIndexCacheImpl owner) { super(data, BaseUtilities.activeReferenceQueue()); Parameters.notNull("data", data); //NOI18N Parameters.notNull("owner", owner); //NOI18N this.owner = owner; }
Example 6
Source File: ClassIndexImpl.java From netbeans with Apache License 2.0 | 4 votes |
public Ref (ClassIndexImplListener listener) { super (listener, BaseUtilities.activeReferenceQueue()); }
Example 7
Source File: WriteBackTransaction.java From netbeans with Apache License 2.0 | 4 votes |
public CacheRef(WriteBackTransaction storage, Object referent) { super(referent, BaseUtilities.activeReferenceQueue()); this.storage = storage; }
Example 8
Source File: ShellRegistry.java From netbeans with Apache License 2.0 | 4 votes |
public CLR(FileObject workRoot, JShellEnvironment referent) { super(referent, BaseUtilities.activeReferenceQueue()); this.workRoot = workRoot; }
Example 9
Source File: SnippetRegistry.java From netbeans with Apache License 2.0 | 4 votes |
public SWR(SnippetHandle referent) { super(referent, BaseUtilities.activeReferenceQueue()); }
Example 10
Source File: TruffleProperties.java From netbeans with Apache License 2.0 | 4 votes |
Disposable(LinkedList<?> list, Consumer f) { this.list = list; this.f = f; ref = new DisposableReference(this, BaseUtilities.activeReferenceQueue()); }
Example 11
Source File: FieldLNCache.java From netbeans with Apache License 2.0 | 4 votes |
FileKey(FileObject fo, String url) { super(fo, BaseUtilities.activeReferenceQueue()); this.url = url; }
Example 12
Source File: WeakHashMapActive.java From netbeans with Apache License 2.0 | 4 votes |
public WeakHashMapActive() { super(); map = new HashMap<>(); queue = BaseUtilities.activeReferenceQueue(); }
Example 13
Source File: WeakHashMapActive.java From netbeans with Apache License 2.0 | 4 votes |
public WeakHashMapActive() { super(); map = new HashMap<>(); queue = BaseUtilities.activeReferenceQueue(); }
Example 14
Source File: FolderPathLookup.java From netbeans with Apache License 2.0 | 4 votes |
Ref(Object inst) { super(inst, BaseUtilities.activeReferenceQueue()); }
Example 15
Source File: JarFileSystem.java From netbeans with Apache License 2.0 | 4 votes |
public Ref(T fo) { super(fo, BaseUtilities.activeReferenceQueue()); }
Example 16
Source File: IndexManager.java From netbeans with Apache License 2.0 | 4 votes |
Ref(@NonNull final File folder, @NonNull final Index index) { super(index, BaseUtilities.activeReferenceQueue()); this.folder = folder; }