Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-11424

Deprecate StorageType Configuration in favour of MediaType

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 11.0.0.CR1
    • 11.0.0.Alpha2
    • Core
    • None

    Description

      Currently caches have configuration to specify memory storing aspects that affects eviction, e.g.

      <memory>
          <object size="20000"/>
      </memory>
      
      <memory>
         <off-heap size="10000000" eviction="MEMORY"/>
      </memory>
      
      <memory>
         <binary strategy="EXCEPTION" eviction="MEMORY" size="5000"/>
      </memory>
      

      Each of those configurations affect the format that the data will be stored, being object the default on-heap storage, off-heap the byte[] out of heap storage and binary an on-heap format that mix byte[], String and primitives.

      This ticket proposes to have the MediaType of the keys and values to dictate the storage format, and let the <memory> element to be responsible to choose between on-heap and off-heap storage, eliminating the Binary option altogether. The configuration would be something like:

      <!-- Default configuration, heap storage with POJOs -->
      <memory storage="heap">
          <eviction size="20000"/>
      </memory>
      
      <!-- Storing java serialized objects, on-heap -->
      <encoding>
          <key media-type="application/x-java-serialized-object"/>
          <value media-type="application/x-java-serialized-object"/>
      </encoding>
      <memory storage="heap">
          <eviction size="20000"/>
      </memory>
      
      <!-- Off-heap configuration, in protobuf format -->
      <encoding>
          <key media-type="application/x-protostream"/>
          <value media-type="application/x-protostream"/>
      </encoding>
      <memory storage="off-heap">
          <eviction size="10000000" eviction="MEMORY"/>
      </memory>
      

      Attachments

        Issue Links

          Activity

            People

              gfernand@redhat.com Gustavo Fernandes (Inactive)
              gfernand@redhat.com Gustavo Fernandes (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: