| 
| static< K, V > void  | writeMap (Map< K, V > map, Externalizer< K > keyExternalizer, Externalizer< V > valueExternalizer, ObjectOutput output)  throws IOException  | 
|   | 
| static< K, V, TYPED_MAP extends Map< K, V > TYPED_MAP  | readMap (ObjectInput input, Externalizer< K > keyExternalizer, Externalizer< V > valueExternalizer, MarshallUtil.MapBuilder< K, V, TYPED_MAP > mapBuilder)  throws IOException, ClassNotFoundException  | 
|   | 
| static< E > void  | writeCollection (Collection< E > col, Externalizer< E > valueExternalizer, ObjectOutput output)  throws IOException  | 
|   | 
| static< E, T extends Collection< E > T  | readCollection (ObjectInput input, Externalizer< E > valueExternalizer, MarshallUtil.CollectionBuilder< E, T > colBuilder)  throws ClassNotFoundException, IOException  | 
|   | 
| static void  | marshall (Integer obj, ObjectOutput output)  throws IOException  | 
|   | 
| static Integer  | unmarshallInteger (ObjectInput input)  throws IOException  | 
|   | 
 | 
| static final Logger  | log = Logger.getLogger(KeycloakMarshallUtil.class) | 
|   | 
Helper to optimize marshalling/unmarhsalling of some types
- 著者
 - Marek Posolda 
 
 
◆ marshall()
  
  
      
        
          | static void org.keycloak.models.sessions.infinispan.util.KeycloakMarshallUtil.marshall  | 
          ( | 
          Integer  | 
          obj,  | 
         
        
           | 
           | 
          ObjectOutput  | 
          output  | 
         
        
           | 
          ) | 
           |  throws IOException | 
         
       
   | 
  
inlinestatic   | 
  
 
Marshalls the given object with support of
 values. 
- 引数
 - 
  
    | obj | Object to marshall (can be )  | 
    | output | Output stream  | 
  
   
- 例外
 - 
  
  
 
  150             output.writeBoolean(
false);
   152             output.writeBoolean(
true);
   153             output.writeInt(obj);
  
 
 
◆ readCollection()
  
  
      
        
          | static <E, T extends Collection<E> T org.keycloak.models.sessions.infinispan.util.KeycloakMarshallUtil.readCollection  | 
          ( | 
          ObjectInput  | 
          input,  | 
         
        
           | 
           | 
          Externalizer< E >  | 
          valueExternalizer,  | 
         
        
           | 
           | 
          MarshallUtil.CollectionBuilder< E, T >  | 
          colBuilder  | 
         
        
           | 
          ) | 
           |  throws ClassNotFoundException, IOException | 
         
       
   | 
  
inlinestatic   | 
  
 
  124         byte b = input.readByte();
   129             int size = input.readInt();
   131             T col = colBuilder.build(size);
   133             for (
int i=0 ; i<size ; i++) {
   134                 E value = valueExternalizer.readObject(input);
  
 
 
◆ readMap()
  
  
      
        
          | static <K, V, TYPED_MAP extends Map<K, V> TYPED_MAP org.keycloak.models.sessions.infinispan.util.KeycloakMarshallUtil.readMap  | 
          ( | 
          ObjectInput  | 
          input,  | 
         
        
           | 
           | 
          Externalizer< K >  | 
          keyExternalizer,  | 
         
        
           | 
           | 
          Externalizer< V >  | 
          valueExternalizer,  | 
         
        
           | 
           | 
          MarshallUtil.MapBuilder< K, V, TYPED_MAP >  | 
          mapBuilder  | 
         
        
           | 
          ) | 
           |  throws IOException, ClassNotFoundException | 
         
       
   | 
  
inlinestatic   | 
  
 
   83         byte b = input.readByte();
    88             int size = input.readInt();
    90             TYPED_MAP map = mapBuilder.build(size);
    92             for (
int i=0 ; i<size ; i++) {
    93                 K key = keyExternalizer.readObject(input);
    94                 V value = valueExternalizer.readObject(input);
  
 
 
◆ unmarshallInteger()
  
  
      
        
          | static Integer org.keycloak.models.sessions.infinispan.util.KeycloakMarshallUtil.unmarshallInteger  | 
          ( | 
          ObjectInput  | 
          input | ) | 
           throws IOException | 
         
       
   | 
  
inlinestatic   | 
  
 
Unmarshals the given object into
 instance. 
- 引数
 - 
  
  
 
- 戻り値
 - Unmarshalled value (can be ) 
 
- 例外
 - 
  
  
 
  164         boolean isSet = input.readBoolean();
   165         return isSet ? input.readInt() : null;
  
 
 
◆ writeCollection()
  
  
      
        
          | static <E> void org.keycloak.models.sessions.infinispan.util.KeycloakMarshallUtil.writeCollection  | 
          ( | 
          Collection< E >  | 
          col,  | 
         
        
           | 
           | 
          Externalizer< E >  | 
          valueExternalizer,  | 
         
        
           | 
           | 
          ObjectOutput  | 
          output  | 
         
        
           | 
          ) | 
           |  throws IOException | 
         
       
   | 
  
inlinestatic   | 
  
 
  112             Collection<E> copy = 
new LinkedList<>(col);
   114             output.writeInt(copy.size());
   116             for (E entry : copy) {
   117                 valueExternalizer.writeObject(output, entry);
  
 
 
◆ writeMap()
  
  
      
        
          | static <K, V> void org.keycloak.models.sessions.infinispan.util.KeycloakMarshallUtil.writeMap  | 
          ( | 
          Map< K, V >  | 
          map,  | 
         
        
           | 
           | 
          Externalizer< K >  | 
          keyExternalizer,  | 
         
        
           | 
           | 
          Externalizer< V >  | 
          valueExternalizer,  | 
         
        
           | 
           | 
          ObjectOutput  | 
          output  | 
         
        
           | 
          ) | 
           |  throws IOException | 
         
       
   | 
  
inlinestatic   | 
  
 
   68             Map<K, V> copy = 
new HashMap<>(map);
    71             output.writeInt(copy.size());
    73             for (Map.Entry<K, V> entry : copy.entrySet()) {
    74                 keyExternalizer.writeObject(output, entry.getKey());
    75                 valueExternalizer.writeObject(output, entry.getValue());
  
 
 
◆ log
  
  
      
        
          | final Logger org.keycloak.models.sessions.infinispan.util.KeycloakMarshallUtil.log = Logger.getLogger(KeycloakMarshallUtil.class) | 
         
       
   | 
  
staticprivate   | 
  
 
 
◆ STRING_EXT
  
  
      
        
          | final Externalizer<String> org.keycloak.models.sessions.infinispan.util.KeycloakMarshallUtil.STRING_EXT = new StringExternalizer() | 
         
       
   | 
  
static   | 
  
 
 
◆ UUID_EXT
  
  
      
        
          | final Externalizer<UUID> org.keycloak.models.sessions.infinispan.util.KeycloakMarshallUtil.UUID_EXT | 
         
       
   | 
  
static   | 
  
 
初期値:= new Externalizer<UUID>() {
        @Override
        public void writeObject(ObjectOutput output, UUID uuid) throws IOException {
            MarshallUtil.marshallUUID(uuid, output, true);
        }
        @Override
        public UUID readObject(ObjectInput input) throws IOException, ClassNotFoundException {
            return MarshallUtil.unmarshallUUID(input, true);
        }
    }
 
 
 
このクラス詳解は次のファイルから抽出されました:
- D:/AppData/doxygen/keycloak/src/keycloak/src/main/java/org/keycloak/models/sessions/infinispan/util/KeycloakMarshallUtil.java