 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.model.index;
22 import java.io.IOException;
23 import java.io.ObjectInputStream;
24 import java.io.ObjectOutputStream;
25 import java.util.Collection;
26 import org.jetbrains.annotations.NotNull;
27 import org.jetbrains.annotations.Nullable;
78 void add(@NotNull V value,
long timestamp);
85 void remove(@NotNull V value);
99 void setName(@NotNull V value,
long timestamp, @NotNull String
name);
108 String
getName(@NotNull V value);
147 void save(@NotNull ObjectOutputStream objectOutputStream)
throws IOException;
155 void load(@NotNull ObjectInputStream objectInputStream)
throws IOException;
int size()
Returns the number of values in this cache.
void load(@NotNull ObjectInputStream objectInputStream)
Restores the state from an ObjectInputStream.
boolean isModified()
Returns whether the state was modified since last save.
boolean hasPending()
Returns whether at least one pending value exists.
void endUpdate()
Ends an update.
void save(@NotNull ObjectOutputStream objectOutputStream)
Saves the state to an ObjectOutputStream.
void clear()
Clears all values from the index.
Collection< V > findPartialName(@NotNull String name)
Returns all matching values for a (possibly partial) key name.
void setPending(@NotNull V value)
Marks a value as pending.
String getName(@NotNull V value)
Returns the name associated with a value.
void removeIndexListener(@NotNull IndexListener< V > listener)
Removes an IndexListener to be notified of changes.
V removePending()
Returns one pending value.
void addIndexListener(@NotNull IndexListener< V > listener)
Adds an IndexListener to be notified of changes.
Interface for listeners interested in Index related events.
void add(@NotNull V value, long timestamp)
Adds a value to the cache.
void beginUpdate()
Starts an update.
void indexingFinished()
Should be called after indexing has finished.
void setName(@NotNull V value, long timestamp, @NotNull String name)
Associates a value with a name.