Class TemplateEntryData

java.lang.Object
com.gigaspaces.internal.server.storage.TemplateEntryData
All Implemented Interfaces:
IEntryData, ServerEntry

public class TemplateEntryData extends Object implements IEntryData
Since:
8.0.4
Author:
Niv Ingberg
  • Constructor Details

    • TemplateEntryData

      public TemplateEntryData(ITypeDesc typeDesc, ITransportPacket packet, long expirationTime, boolean fromReplication)
    • TemplateEntryData

      public TemplateEntryData()
  • Method Details

    • isExpired

      public boolean isExpired()
    • isExpired

      public boolean isExpired(long limit)
    • getEntryDataType

      public EntryDataType getEntryDataType()
      Specified by:
      getEntryDataType in interface IEntryData
    • getDynamicProperties

      public Map<String,Object> getDynamicProperties()
      Specified by:
      getDynamicProperties in interface IEntryData
    • getVersion

      public int getVersion()
      Description copied from interface: ServerEntry
      Gets the entry version.
      Specified by:
      getVersion in interface ServerEntry
      Returns:
      the entry version.
    • setVersion

      public void setVersion(int version)
      Specified by:
      setVersion in interface IEntryData
    • getExpirationTime

      public long getExpirationTime()
      Description copied from interface: ServerEntry
      Gets the entry expiration time.
      Specified by:
      getExpirationTime in interface ServerEntry
      Returns:
      the entry expiration time.
    • setExpirationTime

      public void setExpirationTime(long expirationTime)
    • getFixedPropertyValue

      public Object getFixedPropertyValue(int index)
      Description copied from interface: ServerEntry
      Gets the specified fixed property's value. The returned value is a reference to the actual property kept in the space.
      Specified by:
      getFixedPropertyValue in interface ServerEntry
      Parameters:
      index - Position of requested property.
      Returns:
      Requested property's value in current entry.
    • setFixedPropertyValue

      public void setFixedPropertyValue(int index, Object value)
      Specified by:
      setFixedPropertyValue in interface IEntryData
    • setFixedPropertyValues

      public void setFixedPropertyValues(Object[] values)
      Specified by:
      setFixedPropertyValues in interface IEntryData
    • getFixedPropertiesValues

      public Object[] getFixedPropertiesValues()
      Specified by:
      getFixedPropertiesValues in interface IEntryData
    • updateData

      public void updateData(IEntryData entryData)
    • getPropertyValue

      public Object getPropertyValue(String name)
      Description copied from interface: ServerEntry
      Gets the specified property's value. The returned value is a reference to the actual property kept in the space.
      Specified by:
      getPropertyValue in interface IEntryData
      Specified by:
      getPropertyValue in interface ServerEntry
      Parameters:
      name - Name of requested property.
      Returns:
      Requested property's value in current entry.
    • getEntryTypeDesc

      public EntryTypeDesc getEntryTypeDesc()
      Specified by:
      getEntryTypeDesc in interface IEntryData
    • setDynamicProperties

      public void setDynamicProperties(Map<String,Object> dynamicProperties)
      Specified by:
      setDynamicProperties in interface IEntryData
    • getCustomQuery

      public ICustomQuery getCustomQuery()
    • setCustomQuery

      public void setCustomQuery(ICustomQuery customQuery)
    • getCustomIndexes

      public List<IQueryIndexScanner> getCustomIndexes()
    • getRangeValue

      public Object getRangeValue(int index)
    • getRangeInclusion

      public boolean getRangeInclusion(int index)
    • match

      public boolean match(Context cacheContext, CacheManager cacheManager, ServerEntry entry, int skipAlreadyMatchedFixedPropertyIndex, String skipAlreadyMatchedIndexPath, RegexCache regexCache, int rightIndex)
    • match

      public boolean match(Context cacheContext, CacheManager cacheManager, ServerEntry entry, int skipAlreadyMatchedFixedPropertyIndex, String skipAlreadyMatchedIndexPath, RegexCache regexCache)
    • matchFixedProperties

      public boolean matchFixedProperties(ServerEntry entry, int skipIndex, RegexCache regexCache, int rightIndex)
      The fixed-property half of match(Context, CacheManager, ServerEntry, int, String, RegexCache, int), over anything that can answer for an entry's property values rather than over an entry that has already been built.

      Reachable on its own because a false from here is a final answer: matching is a conjunction, so no custom query, lease, transaction or generation check can turn a property that failed its predicate into a match. That is what lets a blobstore entry be ruled out against the bytes of the block it lives in, without being decoded first. A true carries no such weight - it says only that the fixed properties do not disagree - and a caller of this method alone must not read it as a match.

    • constrainedFixedPropertyPositions

      public int[] constrainedFixedPropertyPositions()
      The fixed properties this template carries a predicate on - the only ones a caller has to get an entry's values for. Empty when the template asks about none, which is worth knowing before paying to reach an entry at all.

      A template can have an _extendedMatchCodes array and still constrain nothing: the array is allocated for every property of the type and its default, EQ, means "no predicate" when the matching value is null.

      Computed once and shared, so callers must not modify the array.

    • getExtendedMatchCodes

      public short[] getExtendedMatchCodes()
    • getExtendedMatchCodeColumns

      public short[] getExtendedMatchCodeColumns()
    • toSQLQuery

      public SQLQuery<?> toSQLQuery(ITypeDesc typeDesc)
    • isAssignableFrom

      public boolean isAssignableFrom(IServerTypeDesc serverTypeDesc)
    • isIdQuery

      public boolean isIdQuery()