public static void generateSessionIdIfNecessary ( final TraceeBackend backend , final String sessionId ) { if ( backend != null && ! backend . containsKey ( TraceeConstants . SESSION_ID_KEY ) && backend . getConfiguration ( ) . shouldGenerateSessionId ( ) ) { backend . put ( TraceeConstants . SESSION_ID_KEY , Utilities . createAlphanumericHash ( sessionId , backend . getConfiguration ( ) . generatedSessionIdLength ( ) ) ) ; } }
Generate session id hash if it doesn t exist in TraceeBackend and configuration asks for one