public class PrimitiveContextFactory extends Object
PrimitiveContextFactory provides internal users and
 layered products convenience mechanisms for creating
 WorkContexts instances containing primitive data.WorkContextMap| Modifier and Type | Method and Description | 
|---|---|
static WorkContext | 
create(long ctx)
Creates a new  
WorkContext containing 64-bit long
 context data. | 
static WorkContext | 
create(Serializable ctx)
Creates a new  
WorkContext containing opaque
 Serializable context data. | 
static WorkContext | 
create(String ctx)
Creates a new  
WorkContext containing Unicode String
 context data. | 
static WorkContext | 
createASCII(String ctx)
Creates a new  
WorkContext containing 8-bit ASCII
 context data. | 
static String | 
createEncodedKey(String key)
Creates a short  
WorkContext key based on
 key. | 
static WorkContext | 
createMutable(Serializable ctx)
Creates a new  
WorkContext containing opaque
 Serializable context data. | 
public static String createEncodedKey(String key)
WorkContext key based on
 key. Short keys are more efficiently serialized. The
 returned key will always be the same for the same values of
 key.public static WorkContext create(String ctx)
WorkContext containing Unicode String
 context data.public static WorkContext create(long ctx)
WorkContext containing 64-bit long
 context data.public static WorkContext createASCII(String ctx)
WorkContext containing 8-bit ASCII
 context data.public static WorkContext create(Serializable ctx) throws IOException
WorkContext containing opaque
 Serializable context data. CAUTION: use with care. Data
 propagated in this way will be opaque to underlying protocol
 implementations and will generally be less efficient.public static WorkContext createMutable(Serializable ctx) throws IOException
WorkContext containing opaque
 Serializable context data. The context data is not serialized at the time 
 of creation of WorkContext but only when the WorkContextMap needs to 
 propagate the WorkContext entries. This allows the Serializable context 
 data to be updated even after it is put in the WorkContextMap. 
 CAUTION: use with care. Data
 propagated in this way will be opaque to underlying protocol
 implementations and will generally be less efficient.