Package org.apache.johnzon.core
Class BufferStrategyFactory
- java.lang.Object
-
- org.apache.johnzon.core.BufferStrategyFactory
-
public class BufferStrategyFactory extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
BufferStrategyFactory.CharBufferByInstanceProvider
private static class
BufferStrategyFactory.CharBufferQueueProvider
private static class
BufferStrategyFactory.CharBufferSingletonProvider
private static class
BufferStrategyFactory.CharBufferThreadLocalProvider
private static class
BufferStrategyFactory.QueueProvider<T>
private static class
BufferStrategyFactory.SingletonProvider<T>
private static class
BufferStrategyFactory.ThreadLocalProvider<T>
-
Field Summary
Fields Modifier and Type Field Description private static Map<String,BufferStrategy>
DEFAULT_STRATEGIES
-
Constructor Summary
Constructors Modifier Constructor Description private
BufferStrategyFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BufferStrategy
valueOf(String strategyName)
creates a BufferStrategy based on the name.
-
-
-
Field Detail
-
DEFAULT_STRATEGIES
private static final Map<String,BufferStrategy> DEFAULT_STRATEGIES
-
-
Method Detail
-
valueOf
public static BufferStrategy valueOf(String strategyName)
creates a BufferStrategy based on the name. The following BufferStrategies are supported out of the box:- BY_INSTANCE
- THREAD_LOCAL
- QUEUE
- SINGLETON
BufferStrategy
.- Parameters:
strategyName
- one of the supported BufferStrategies as per above- Returns:
- an instance of the chosen BufferStrategy
- Throws:
IllegalArgumentException
- if the given strategyName does not resolve to a BufferStrategy.
-
-