public static final BlockingMode toBlockingMode ( String name ) { BlockingMode mode = null ; if ( name == null ) { mode = null ; } else if ( name . equalsIgnoreCase ( "run" ) ) { mode = RUN ; } else if ( name . equalsIgnoreCase ( "wait" ) ) { mode = WAIT ; } else if ( name . equalsIgnoreCase ( "discard" ) ) { mode = DISCARD ; } else if ( name . equalsIgnoreCase ( "discardOldest" ) ) { mode = DISCARD_OLDEST ; } else if ( name . equalsIgnoreCase ( "abort" ) ) { mode = ABORT ; } return mode ; }
A utility method to convert a string name to a BlockingMode