Class OSNuma.NoOp
java.lang.Object
ca.spottedleaf.concurrentutil.numa.OSNuma.PreCalculatedNuma
ca.spottedleaf.concurrentutil.numa.OSNuma.NoOp
- All Implemented Interfaces:
OSNuma
- Enclosing interface:
OSNuma
-
Nested Class Summary
Nested classes/interfaces inherited from interface ca.spottedleaf.concurrentutil.numa.OSNuma
OSNuma.NoOp, OSNuma.PreCalculatedNuma -
Field Summary
FieldsFields inherited from interface ca.spottedleaf.concurrentutil.numa.OSNuma
NUMA_DISTANCE_CANNOT_DETERMINE -
Method Summary
Modifier and TypeMethodDescriptionintReturns the current core that this thread is running on.long[]Returns the current thread's affinity mask.booleanReturns whether interaction with the OS for NUMA is available.voidsetCurrentThreadAffinity(long[] to) Attempts to adjust the current thread's affinity mask to the specified bitset.Methods inherited from class ca.spottedleaf.concurrentutil.numa.OSNuma.PreCalculatedNuma
getCores, getCurrentNumaNode, getNodeDistances, getNumaDistance, getNumaNode, getTotalCores, getTotalNumaNodesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ca.spottedleaf.concurrentutil.numa.OSNuma
setCurrentNumaAffinity, setCurrentNumaAffinity
-
Field Details
-
INSTANCE
-
-
Method Details
-
isAvailable
public boolean isAvailable()Description copied from interface:OSNumaReturns whether interaction with the OS for NUMA is available. If no interaction is available, then the following applies:- There exists only one NUMA node including all the available processors.
-
Scheduling affinity methods will throw
UnsupportedOperationException
- Returns:
- Whether there exists native support to retrieve NUMA information and set scheduling affinity.
-
getCurrentCore
public int getCurrentCore()Description copied from interface:OSNumaReturns the current core that this thread is running on. If NUMA interaction is not available, then0will be returned.- Returns:
- The current core this thread is running on
- See Also:
-
getCurrentThreadAffinity
public long[] getCurrentThreadAffinity()Description copied from interface:OSNumaReturns the current thread's affinity mask. If NUMA interaction is not available, then this function will return an undefined result.- Returns:
- The current thread's affinity mask.
- See Also:
-
setCurrentThreadAffinity
public void setCurrentThreadAffinity(long[] to) Description copied from interface:OSNumaAttempts to adjust the current thread's affinity mask to the specified bitset. If NUMA interaction is not available, then this function is a no-op.- Parameters:
to- Specified new affinity bitmask.- See Also:
-