Class DBTraceAddressSnapRangePropertyMap<T,DR extends DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData<T>>
- All Implemented Interfaces:
ErrorHandler,DBTraceManager,DBTraceDelegatingManager<DBTraceAddressSnapRangePropertyMapSpace<T,,DR>> TraceAddressSnapRangePropertyMap<T>,TraceAddressSnapRangePropertyMapOperations<T>,SpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
- Direct Known Subclasses:
AbstractDBTracePropertyMap,DBTraceCommentAdapter,DBTraceDataSettingsAdapter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDBTraceAddressSnapRangePropertyMap.DBTraceAddressSnapRangePropertyMapDataFactory<T,DR extends DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData<T>> Nested classes/interfaces inherited from class ghidra.trace.database.space.AbstractDBTraceSpaceBasedManager
AbstractDBTraceSpaceBasedManager.DBTraceSpaceEntryNested classes/interfaces inherited from interface ghidra.trace.database.space.DBTraceDelegatingManager
DBTraceDelegatingManager.ExcConsumer<T,E extends Throwable>, DBTraceDelegatingManager.ExcFunction<T, R, E extends Throwable>, DBTraceDelegatingManager.ExcPredicate<T, E extends Throwable>, DBTraceDelegatingManager.ExcSupplier<T, E extends Throwable> Nested classes/interfaces inherited from interface ghidra.util.database.spatial.SpatialMap
SpatialMap.EmptySpatialMap<DS extends BoundedShape<?>,T, Q> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final DBTraceAddressSnapRangePropertyMap.DBTraceAddressSnapRangePropertyMapDataFactory<T, DR> Fields inherited from class ghidra.trace.database.space.AbstractDBTraceSpaceBasedManager
baseLanguage, dbh, lock, name, NO_ADDRESS_SPACE, regSpacesByContainer, spaces, spaceStore, spacesView, threadManager, traceFields inherited from interface ghidra.util.database.spatial.SpatialMap
EMPTY_MAP -
Constructor Summary
ConstructorsConstructorDescriptionDBTraceAddressSnapRangePropertyMap(String name, DBHandle dbh, OpenMode openMode, ReadWriteLock lock, TaskMonitor monitor, Language baseLanguage, DBTrace trace, DBTraceThreadManager threadManager, Class<DR> dataType, DBTraceAddressSnapRangePropertyMap.DBTraceAddressSnapRangePropertyMapDataFactory<T, DR> dataFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()protected DBTraceAddressSnapRangePropertyMapSpace<T, DR> voiddeleteData(DR data) voiddeleteValue(T value) For maps where values are the entries, remove a valueentries()firstKey()getAddressSetView(Lifespan span) getAddressSetView(Lifespan span, Predicate<T> predicate) getForSpace(AddressSpace space, boolean createIfAbsent) getName()getRegisterSpace(TraceStackFrame frame, boolean createIfAbsent) getRegisterSpace(TraceThread thread, boolean createIfAbsent) booleanisEmpty()keys()put(TraceAddressSnapRange shape, T value) Put an entry into the mapreadLock()SpatialMap<TraceAddressSnapRange, T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery> booleanremove(TraceAddressSnapRange shape, T value) Remove an entry from the mapbooleanremove(Map.Entry<TraceAddressSnapRange, T> entry) Remove an entry from the mapintsize()Get or compute the size of this mapvalues()Methods inherited from class ghidra.trace.database.space.AbstractDBTraceSpaceBasedManager
dbError, get, getActiveSpaces, getBaseLanguage, getForRegisterSpace, getForRegisterSpace, getForRegisterSpace, getLock, getSpaceByName, getTabledSpaces, getTrace, invalidateCache, loadSpaces, tableNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.trace.database.space.DBTraceDelegatingManager
checkIsInMemory, delegateAddressSet, delegateAny, delegateCollection, delegateDeleteB, delegateDeleteV, delegateFirst, delegateHashSet, delegateRead, delegateRead, delegateReadB, delegateReadI, delegateReadI, delegateReadOr, delegateWrite, delegateWriteAll, delegateWriteI, delegateWriteVMethods inherited from interface ghidra.trace.model.map.TraceAddressSnapRangePropertyMapOperations
put, put, put, put
-
Field Details
-
dataType
protected final Class<DR extends DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData<T>> dataType -
dataFactory
-
-
Constructor Details
-
DBTraceAddressSnapRangePropertyMap
public DBTraceAddressSnapRangePropertyMap(String name, DBHandle dbh, OpenMode openMode, ReadWriteLock lock, TaskMonitor monitor, Language baseLanguage, DBTrace trace, DBTraceThreadManager threadManager, Class<DR> dataType, DBTraceAddressSnapRangePropertyMap.DBTraceAddressSnapRangePropertyMapDataFactory<T, DR> dataFactory) throws IOException, VersionException- Throws:
IOExceptionVersionException
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceTraceAddressSnapRangePropertyMap<T>
-
createSpace
protected DBTraceAddressSnapRangePropertyMapSpace<T,DR> createSpace(AddressSpace space, AbstractDBTraceSpaceBasedManager.DBTraceSpaceEntry ent) throws VersionException, IOException - Specified by:
createSpacein classAbstractDBTraceSpaceBasedManager<DBTraceAddressSnapRangePropertyMapSpace<T,DR extends DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData<T>>> - Throws:
VersionExceptionIOException
-
getRegisterSpace
public DBTraceAddressSnapRangePropertyMapSpace<T,DR> getRegisterSpace(TraceThread thread, boolean createIfAbsent) - Specified by:
getRegisterSpacein interfaceTraceAddressSnapRangePropertyMap<T>
-
getRegisterSpace
public DBTraceAddressSnapRangePropertyMapSpace<T,DR> getRegisterSpace(TraceStackFrame frame, boolean createIfAbsent) - Specified by:
getRegisterSpacein interfaceTraceAddressSnapRangePropertyMap<T>
-
getForSpace
public DBTraceAddressSnapRangePropertyMapSpace<T,DR> getForSpace(AddressSpace space, boolean createIfAbsent) - Specified by:
getForSpacein interfaceDBTraceDelegatingManager<T>- Overrides:
getForSpacein classAbstractDBTraceSpaceBasedManager<DBTraceAddressSnapRangePropertyMapSpace<T,DR extends DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData<T>>>
-
readLock
- Specified by:
readLockin interfaceDBTraceDelegatingManager<T>
-
writeLock
- Specified by:
writeLockin interfaceDBTraceDelegatingManager<T>
-
deleteValue
Description copied from interface:TraceAddressSnapRangePropertyMapOperationsFor maps where values are the entries, remove a value- Specified by:
deleteValuein interfaceTraceAddressSnapRangePropertyMapOperations<T>- Parameters:
value- the entry to remove
-
deleteData
-
put
Description copied from interface:SpatialMapPut an entry into the mapNote that the map may copy, and possibly modify, the given value. The value returned is the value actually stored by the map. This may be useful when the map's values are identical to its records. This allows the creation of a "blank" entry with a given shape. The entry is then populated by the user.
class MyDBDataRecord extends DBTreeDataRecord<MyShape, MyNodeShape, MyDBDataRecord> { @Override protected void setValue(MyDBDataRecord value) { // Do nothing: value ought to be null. Map will create and return "blank" record } protected MyDBDataRecord getValue() { return this; // The record is the value } } MyDBDataRecord rec = map.put(MyShape.create(args), null); rec.setSomething(6); rec.setAnother("My user data");This practice is preferred when the values are not simple, and/or when the shape is a property of the value. In other cases, e.g., when the value is an enum or a
Color, thenDBTreeDataRecord.setRecordValue(Object)andDBTreeDataRecord.getRecordValue()should be implemented as field accessors.- Specified by:
putin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery> - Parameters:
shape- the shape of the entryvalue- the value for the entry- Returns:
- the value as stored in the map
-
remove
Description copied from interface:SpatialMapRemove an entry from the mapRemoves a single matching entry, if found, from the map. If you have a reference to an entry obtained from this map, use
SpatialMap.remove(Entry)instead. Otherwise, this is the preferred method.- Specified by:
removein interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery> - Parameters:
shape- the shape of the entry to removevalue- the value of the entry to remove- Returns:
- true if the map was modified
-
remove
Description copied from interface:SpatialMapRemove an entry from the mapThis method is preferred only when the given entry comes directly from this map. This spares the implementation from having to search for a matching entry. If the entry does not come from this map, it will behave like
SpatialMap.remove(BoundedShape, Object).- Specified by:
removein interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery> - Parameters:
entry- the entry to remove- Returns:
- true if the map was modified
-
size
public int size()Get or compute the size of this mapNote that this may not necessarily be a quick operation, esp., if this map is the result of
SpatialMap.reduce(Object). In the worst case, all elements in the reduced map will be visited. Note this counts entries in memory spaces only. No register spaces are included.- Specified by:
sizein interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery> - Returns:
- the number of data entries in the map
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
entries
- Specified by:
entriesin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
orderedEntries
- Specified by:
orderedEntriesin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
keys
- Specified by:
keysin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
orderedKeys
- Specified by:
orderedKeysin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
values
- Specified by:
valuesin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
orderedValues
- Specified by:
orderedValuesin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
reduce
public SpatialMap<TraceAddressSnapRange,T, reduceDBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery> (DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery query) - Specified by:
reducein interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
firstEntry
- Specified by:
firstEntryin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
firstKey
- Specified by:
firstKeyin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
firstValue
- Specified by:
firstValuein interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
clear
public void clear()- Specified by:
clearin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
getAddressSetView
- Specified by:
getAddressSetViewin interfaceTraceAddressSnapRangePropertyMapOperations<T>
-
getAddressSetView
- Specified by:
getAddressSetViewin interfaceTraceAddressSnapRangePropertyMapOperations<T>
-