Package edu.duke.cs.osprey.coffee.nodedb
Class NodeDB
java.lang.Object
edu.duke.cs.osprey.coffee.nodedb.NodeDB
- All Implemented Interfaces:
AutoCloseable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal longfinal MultiStateConfSpacefinal Filefinal longfinal ClusterMemberfinal longfinal NodePerformancefinal Filestatic final String -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int statei, List<NodeIndex.Node> nodes) Adds nodes to the cluster.voidadd(NodeIndex.Node node) Conveience method to add a single node.voidaddLocal(int statei, List<NodeIndex.Node> nodes) Add nodes to the local storevoidaddLocal(NodeIndex.Node node) Conveience method to add a single node to the local store.voidstatic voidvoidclear(int statei) Remove all the nodes from the given statevoidclearLocal(int statei) voidclose()longfreeSpaceLocal(int statei) longnodesPerBlock(int statei) removeHigh(int statei) Conveience method to remove a single node.voidremoveHigh(int statei, int count, List<NodeIndex.Node> nodes) Removes high-scoring nodes from the cluster.removeHighestLocal(int statei) Conveience method to remove a single node.voidremoveHighestLocal(int statei, int count, List<NodeIndex.Node> nodes) Removes the highest node from the local index.voidsetDropHandler(Consumer<Stream<NodeIndex.Node>> dropHandler) Set a function to call when dropped nodes need to be processed.longsize(int statei) floatusage()Returns the ratio of used space to total space.
-
Field Details
-
ServiceName
- See Also:
-
confSpace
-
member
-
file
-
fileBytes
public final long fileBytes -
memBytes
public final long memBytes -
broadcastNs
public final long broadcastNs -
scoringLog
-
perf
-
-
Method Details
-
checkSocketIOThread
public static void checkSocketIOThread() -
setDropHandler
Set a function to call when dropped nodes need to be processed. Called from the NodeDB thread, not the caller thread! -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
size
public long size(int statei) -
broadcast
public void broadcast() -
clear
public void clear(int statei) Remove all the nodes from the given state -
clearLocal
public void clearLocal(int statei) -
add
Adds nodes to the cluster. Local storage is preferred if there's space. Next, remote storage is preferred if there's space. Otherwise, space will be evicted from local storage to make room. -
add
Conveience method to add a single node. The batched version is preferred, for speed. -
addLocal
Add nodes to the local store -
addLocal
Conveience method to add a single node to the local store. The batched version is preferred, for speed. -
removeHighestLocal
Removes the highest node from the local index. -
removeHighestLocal
Conveience method to remove a single node. The batched version is preferred, for speed. -
removeHigh
Removes high-scoring nodes from the cluster. It's not necessarily the highest-scoring nodes, due to delays in score broadcasting, but they should be pretty high. -
removeHigh
Conveience method to remove a single node. The batched version is preferred, for speed. -
freeSpaceLocal
public long freeSpaceLocal(int statei) -
nodesPerBlock
public long nodesPerBlock(int statei) -
usage
public float usage()Returns the ratio of used space to total space.
-