Package org.infinispan.marshall

Examples of org.infinispan.marshall.Marshalls


      return writers.get(o.getClass()).getExternalizerId();
   }

   private void loadInternalMarshallables(RemoteCommandsFactory cmdFactory, StreamingMarshaller ispnMarshaller) {
      for (Externalizer ext : internalExternalizers) {
         Marshalls marshalls = ReflectionUtil.getAnnotation(ext.getClass(), Marshalls.class);
         if (ext instanceof ReplicableCommandExternalizer)
            ((ReplicableCommandExternalizer) ext).inject(cmdFactory);
         if (ext instanceof MarshalledValue.Externalizer)
            ((MarshalledValue.Externalizer) ext).inject(ispnMarshaller);

         int id = checkInternalIdLimit(marshalls.id(), ext);
         updateExtReadersWritersWithTypes(marshalls, new ExternalizerAdapter(id, ext));
      }
   }
View Full Code Here


      List<ExternalizerConfig> configs = type.getExternalizerConfigs();
      for (ExternalizerConfig config : configs) {
         Externalizer ext = config.getExternalizer() != null ? config.getExternalizer()
               : (Externalizer) Util.getInstance(config.getExternalizerClass());

         Marshalls marshalls = ReflectionUtil.getAnnotation(ext.getClass(), Marshalls.class);
         // If no XML or programmatic config, id in annotation is used
         // as long as it's not default one (meaning, user did not set it).
         // If XML or programmatic config in use ignore @Marshalls annotation and use value in config.
         int id = marshalls.id();
         if (config.getId() == null && id == Integer.MAX_VALUE)
            throw new ConfigurationException(String.format(
                  "No externalizer identifier set for externalizer %s", ext.getClass().getName()));
         else if (config.getId() != null)
            id = config.getId();
View Full Code Here

TOP

Related Classes of org.infinispan.marshall.Marshalls

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.