Class AbstractPersistentConcurrentOffHeapCache<K,​V>

    • Constructor Detail

      • AbstractPersistentConcurrentOffHeapCache

        public AbstractPersistentConcurrentOffHeapCache​(Factory<? extends PinnableSegment<K,​V>> segmentFactory)
        Create a concurrent map using a default number of segments.
        Parameters:
        segmentFactory - factory used to create the map segments
      • AbstractPersistentConcurrentOffHeapCache

        public AbstractPersistentConcurrentOffHeapCache​(Factory<? extends PinnableSegment<K,​V>> segmentFactory,
                                                        int concurrency)
        Create a concurrent map with a defined number of segments.
        Parameters:
        segmentFactory - factory used to create the map segments
        concurrency - number of segments in the map
        Throws:
        java.lang.IllegalArgumentException - if the supplied number of segments is negative
    • Method Detail

      • flush

        public void flush()
                   throws java.io.IOException
        Specified by:
        flush in interface Persistent
        Throws:
        java.io.IOException
      • persist

        public void persist​(java.io.ObjectOutput output)
                     throws java.io.IOException
        Specified by:
        persist in interface Persistent
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface Persistent
        Throws:
        java.io.IOException
      • bootstrap

        public void bootstrap​(java.io.ObjectInput input)
                       throws java.io.IOException
        Specified by:
        bootstrap in interface Persistent
        Throws:
        java.io.IOException
      • readSegmentCount

        protected static int readSegmentCount​(java.io.ObjectInput input)
                                       throws java.io.IOException
        Throws:
        java.io.IOException