Class ExternalScheme

    • Constructor Detail

      • ExternalScheme

        public ExternalScheme()
    • Method Detail

      • getExpiryDelay

        public Seconds getExpiryDelay​(ParameterResolver resolver)
        Return the amount of time since the last update that entries are kept by the cache before being expired. Entries that have expired are not accessible and are evicted the next time a client accesses the cache. Any attempt to read an expired entry results in a reloading of the entry from the CacheStore.
        Parameters:
        resolver - the ParameterResolver
        Returns:
        the expiry delay
      • setExpiryDelay

        @Injectable
        public void setExpiryDelay​(Expression<Seconds> expr)
        Set the expiry delay.
        Parameters:
        expr - the expiry delay expression
      • getHighUnits

        public Units getHighUnits​(ParameterResolver resolver)
        Return the limit of cache size. Contains the maximum number of units that can be placed n the cache before pruning occurs. An entry is the unit of measurement, unless it is overridden by an alternate unit-calculator. When this limit is exceeded, the cache begins the pruning process, evicting entries according to the eviction policy. Legal values are positive integers or zero. Zero implies no limit.
        Parameters:
        resolver - the ParameterResolver
        Returns:
        the high units
      • setHighUnits

        @Injectable
        public void setHighUnits​(Expression<Units> expr)
        Set the high units.
        Parameters:
        expr - the high units expression
      • getUnitCalculatorBuilder

        public UnitCalculatorBuilder getUnitCalculatorBuilder()
        Return the UnitCalculatorBuilder used to build a UnitCalculator.
        Returns:
        the unit calculator
      • setUnitCalculatorBuilder

        @Injectable("unit-calculator")
        public void setUnitCalculatorBuilder​(UnitCalculatorBuilder bldr)
        Set the UnitCalculatorBuilder.
        Parameters:
        bldr - the UnitCalculatorBuilder
      • getUnitFactor

        public int getUnitFactor​(ParameterResolver resolver)
        Return the unit-factor element specifies the factor by which the units, low-units and high-units properties are adjusted. Using a BINARY unit calculator, for example, the factor of 1048576 could be used to count megabytes instead of bytes.
        Parameters:
        resolver - the ParameterResolver
        Returns:
        the unit factor
      • setUnitFactor

        @Injectable
        public void setUnitFactor​(Expression<Integer> expr)
        Set the unit factor.
        Parameters:
        expr - the unit factor expression
      • instantiateSerializationMap

        protected Map instantiateSerializationMap​(ParameterResolver resolver,
                                                  BinaryStore store,
                                                  boolean fBinaryMap,
                                                  ClassLoader loader,
                                                  int cHighUnits,
                                                  int cExpiryMillis)
        Instantiate a SerializationMap, SerializationCache, SimpleSerializationMap, or any sub-class thereof.
        Parameters:
        resolver - the ParmeterResolver
        store - a BinaryStore to use to write serialized data to
        fBinaryMap - true if the only data written to the Map will already be in Binary form
        loader - the ClassLoader to use (if not a Binary map)
        cHighUnits - the max size in units for the serialization cache
        cExpiryMillis - the expiry time in milliseconds for the cache
        Returns:
        a BinaryMap, SerializationMap, SerializationCache, SimpleSerializationMap, or a subclass thereof
      • instantiateSerializationCache

        protected SerializationCache instantiateSerializationCache​(BinaryStore store,
                                                                   int cMax,
                                                                   ClassLoader loader)
        Construct an SerializationCache using the specified parameters.

        This method exposes a corresponding SerializationCache constructor and is provided for the express purpose of allowing its override.

        Parameters:
        store - the BinaryStore to use to write the serialized objects to
        cMax - the maximum number of items to store in the binary store
        loader - the ClassLoader to use for deserialization
        Returns:
        the instantiated SerializationCache
      • instantiateSerializationCache

        protected SerializationCache instantiateSerializationCache​(BinaryStore store,
                                                                   int cMax,
                                                                   boolean fBinaryMap)
        Construct an SerializationCache using the specified parameters.

        This method exposes a corresponding SerializationCache constructor and is provided for the express purpose of allowing its override.

        Parameters:
        store - the BinaryStore to use to write the serialized objects to
        cMax - the maximum number of items to store in the binary store
        fBinaryMap - true indicates that this map will only manage binary keys and values
        Returns:
        the instantiated SerializationCache
      • instantiateSerializationMap

        protected SerializationMap instantiateSerializationMap​(BinaryStore store,
                                                               ClassLoader loader)
        Construct an SerializationMap using the specified parameters.

        This method exposes a corresponding SerializationMap constructor and is provided for the express purpose of allowing its override.

        Parameters:
        store - the BinaryStore to use to write the serialized objects to
        loader - the ClassLoader to use for deserialization
        Returns:
        the instantiated SerializationMap
      • instantiateSerializationMap

        protected SerializationMap instantiateSerializationMap​(BinaryStore store,
                                                               boolean fBinaryMap)
        Construct an SerializationMap using the specified parameters.

        This method exposes a corresponding SerializationMap constructor and is provided for the express purpose of allowing its override.

        Parameters:
        store - the BinaryStore to use to write the serialized objects to
        fBinaryMap - true indicates that this map will only manage binary keys and values
        Returns:
        the instantiated SerializationMap
      • instantiateSimpleSerializationMap

        protected SimpleSerializationMap instantiateSimpleSerializationMap​(BinaryStore store,
                                                                           ClassLoader loader)
        Construct a SimpleSerializationMap using the specified parameters.

        This method exposes a corresponding SerializationMap constructor and is provided for the express purpose of allowing its override.

        Parameters:
        store - the BinaryStore to use to write the serialized objects to
        loader - the ClassLoader to use for deserialization
        Returns:
        the instantiated SimpleSerializationMap
        Since:
        Coherence 3.7
      • instantiateSimpleSerializationMap

        protected SimpleSerializationMap instantiateSimpleSerializationMap​(BinaryStore store,
                                                                           boolean fBinaryMap)
        Construct a SimpleSerializationMap using the specified parameters.

        This method exposes a corresponding SerializationMap constructor and is provided for the express purpose of allowing its override.

        Parameters:
        store - the BinaryStore to use to write the serialized objects to
        fBinaryMap - true indicates that this map will only manage binary keys and values
        Returns:
        the instantiated SimpleSerializationMap
        Since:
        Coherence 3.7