|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IDeclarativeModule
one of two specialized modules, this one handles all declarative memory operations for the model, in particular adding and retrieving of chunks, chunktypes all operation return values are wrapped in Future<> to better support backed concurrencies
Future| Method Summary | |
|---|---|
java.util.concurrent.Future<IChunk> |
addChunk(IChunk chunk)
add this chunk to the model and optionally check for duplicates so that it can be merged if necessary |
java.util.concurrent.Future<IChunkType> |
addChunkType(IChunkType chunkType)
add the chunktype to the model. |
void |
addListener(IDeclarativeModuleListener listener,
java.util.concurrent.Executor executor)
|
java.util.concurrent.Future<IChunk> |
copyChunk(IChunk sourceChunk)
return a copy of source chunk |
java.util.concurrent.Future<IChunk> |
createChunk(IChunkType parent,
java.lang.String name)
create a chunk to later be inserted. |
java.util.concurrent.Future<IChunkType> |
createChunkType(IChunkType parent,
java.lang.String name)
create a new chunktype to be added after its symbolic contents have been set. |
void |
dispose(IChunk chunk)
request that this chunk be disposed. |
java.util.concurrent.Future<java.util.Collection<IChunk>> |
findExactMatches(ChunkTypeRequest request,
java.util.Comparator<IChunk> sorter,
double activationThreshold,
boolean bestOne)
search DM for all the chunks that match pattern, sorting using sorter, that are above activationThreshold |
java.util.concurrent.Future<java.util.Collection<IChunk>> |
findPartialMatches(ChunkTypeRequest request,
java.util.Comparator<IChunk> sorter,
double activationThreshold,
boolean bestOne)
search DM for all the chunks that partially match |
IChunk |
getBusyChunk()
snag the busy chunk. Note : this should not be called by the declarative memory module if the retrieval will access the future methods as it might result in deadlock. |
java.util.concurrent.Future<IChunk> |
getChunk(java.lang.String name)
return the named chunk, case insensitive but preserving |
java.util.concurrent.Future<java.util.Collection<IChunk>> |
getChunks()
return all chunks. |
java.util.concurrent.Future<IChunkType> |
getChunkType(java.lang.String name)
return the named chunktype. |
java.util.concurrent.Future<java.util.Collection<IChunkType>> |
getChunkTypes()
return all the chunk types in this model |
IChunk |
getEmptyChunk()
snag the busy chunk. Note : this should not be called by the declarative memory module if the retrieval will access the future methods as it might result in deadlock. |
IChunk |
getErrorChunk()
snag the busy chunk. Note : this should not be called by the declarative memory module if the retrieval will access the future methods as it might result in deadlock. |
IChunk |
getFreeChunk()
snag the busy chunk. Note : this should not be called by the declarative memory module if the retrieval will access the future methods as it might result in deadlock. |
IChunk |
getFullChunk()
snag the busy chunk. Note : this should not be called by the declarative memory module if the retrieval will access the future methods as it might result in deadlock. |
IChunk |
getNewChunk()
snag the busy chunk. Note : this should not be called by the declarative memory module if the retrieval will access the future methods as it might result in deadlock. |
long |
getNumberOfChunks()
return the number of chunks in the model. |
IChunk |
getRequestedChunk()
snag the busy chunk. Note : this should not be called by the declarative memory module if the retrieval will access the future methods as it might result in deadlock. |
IChunk |
getUnrequestedChunk()
snag the busy chunk. Note : this should not be called by the declarative memory module if the retrieval will access the future methods as it might result in deadlock. |
void |
removeListener(IDeclarativeModuleListener listener)
|
boolean |
willEncode(IChunk chunk)
because encoding might be async, we need a method to determine if a given chunk is scheduled for encoding |
| Methods inherited from interface org.jactr.core.module.IModule |
|---|
dispose, getModel, getName, initialize, install, reset |
| Methods inherited from interface org.jactr.core.utils.IInstallable |
|---|
uninstall |
| Method Detail |
|---|
java.util.concurrent.Future<IChunkType> createChunkType(IChunkType parent,
java.lang.String name)
parent - maybe nullname -
java.util.concurrent.Future<IChunkType> addChunkType(IChunkType chunkType)
chunkType -
java.util.concurrent.Future<IChunkType> getChunkType(java.lang.String name)
name -
java.util.concurrent.Future<java.util.Collection<IChunkType>> getChunkTypes()
java.util.concurrent.Future<IChunk> createChunk(IChunkType parent,
java.lang.String name)
parent - must not be null (duh)name -
void dispose(IChunk chunk)
chunk - java.util.concurrent.Future<IChunk> copyChunk(IChunk sourceChunk)
sourceChunk -
java.util.concurrent.Future<IChunk> addChunk(IChunk chunk)
chunk - checkForDuplicates -
boolean willEncode(IChunk chunk)
chunk -
java.util.concurrent.Future<IChunk> getChunk(java.lang.String name)
name -
java.util.concurrent.Future<java.util.Collection<IChunk>> getChunks()
long getNumberOfChunks()
java.util.concurrent.Future<java.util.Collection<IChunk>> findExactMatches(ChunkTypeRequest request,
java.util.Comparator<IChunk> sorter,
double activationThreshold,
boolean bestOne)
request - sorter - may be nullactivationThreshold - bestOne - find only best one
java.util.concurrent.Future<java.util.Collection<IChunk>> findPartialMatches(ChunkTypeRequest request,
java.util.Comparator<IChunk> sorter,
double activationThreshold,
boolean bestOne)
request - sorter - may be nullactivationThreshold - bestOne - true if you only want the best one chunk
IChunk getBusyChunk()
IChunk getEmptyChunk()
IChunk getErrorChunk()
IChunk getFreeChunk()
IChunk getFullChunk()
IChunk getNewChunk()
IChunk getRequestedChunk()
IChunk getUnrequestedChunk()
void addListener(IDeclarativeModuleListener listener,
java.util.concurrent.Executor executor)
void removeListener(IDeclarativeModuleListener listener)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||