public static void configureNodeContextThreadLocalsForProject ( final Project project ) { final InheritableThreadLocal < String > localNodeName = new InheritableThreadLocal <> ( ) ; final InheritableThreadLocal < String > localUserName = new InheritableThreadLocal <> ( ) ; if ( null == project . getReference ( NODE_NAME_LOCAL_REF_ID ) ) { project . addReference ( NODE_NAME_LOCAL_REF_ID , localNodeName ) ; } if ( null == project . getReference ( NODE_USER_LOCAL_REF_ID ) ) { project . addReference ( NODE_USER_LOCAL_REF_ID , localUserName ) ; } }
Adds InheritableNodeLocal references to the Project for use by the node context tasks