public final class Cache
extends org.gjt.sp.jedit.buffer.BufferAdapter
Modifier and Type | Method and Description |
---|---|
void |
clear()
remove all cache entries
|
void |
contentInserted(org.gjt.sp.jedit.buffer.JEditBuffer buffer,
int startLine,
int offset,
int numLines,
int length)
invalidate cache entries corresponding to (not requested by) this buffer
|
void |
contentRemoved(org.gjt.sp.jedit.buffer.JEditBuffer buffer,
int startLine,
int offset,
int numLines,
int length)
invalidate cache entries corresponding to (not requested by) this buffer
|
void |
disable()
disable caching (persistent)
|
void |
enable()
enable caching (persistent)
|
CacheEntry |
get(java.lang.String path,
java.lang.Object key) |
void |
handleBufferContentChanged(org.gjt.sp.jedit.Buffer buffer) |
void |
handleBufferUpdate(org.gjt.sp.jedit.msg.BufferUpdate message) |
static Cache |
instance() |
CacheEntry |
put(java.lang.String path,
java.lang.Object key,
java.lang.Object value) |
void |
start()
add to EditBus
|
void |
stop()
clear, remove from EditBus, forget singleton
|
void |
transactionComplete(org.gjt.sp.jedit.buffer.JEditBuffer buffer)
invalidate cache entries corresponding to (not requested by) this buffer
|
public static Cache instance()
public CacheEntry put(java.lang.String path, java.lang.Object key, java.lang.Object value)
path
- path of cached resource (file:/ urls are equivalent to paths)key
- unambiguously distinguish schema from completionInfo from...public CacheEntry get(java.lang.String path, java.lang.Object key)
path
- path of cached resource (file:/ urls are equivalent to paths)key
- unambiguously distinguish schema from completionInfo from...public void contentInserted(org.gjt.sp.jedit.buffer.JEditBuffer buffer, int startLine, int offset, int numLines, int length)
contentInserted
in interface org.gjt.sp.jedit.buffer.BufferListener
contentInserted
in class org.gjt.sp.jedit.buffer.BufferAdapter
public void contentRemoved(org.gjt.sp.jedit.buffer.JEditBuffer buffer, int startLine, int offset, int numLines, int length)
contentRemoved
in interface org.gjt.sp.jedit.buffer.BufferListener
contentRemoved
in class org.gjt.sp.jedit.buffer.BufferAdapter
public void transactionComplete(org.gjt.sp.jedit.buffer.JEditBuffer buffer)
transactionComplete
in interface org.gjt.sp.jedit.buffer.BufferListener
transactionComplete
in class org.gjt.sp.jedit.buffer.BufferAdapter
public void handleBufferUpdate(org.gjt.sp.jedit.msg.BufferUpdate message)
public void handleBufferContentChanged(org.gjt.sp.jedit.Buffer buffer)
public void start()
public void stop()
public void clear()
public void disable()
public void enable()