Class SpaceEntriesAggregator<T extends Serializable>

java.lang.Object
com.gigaspaces.query.aggregators.SpaceEntriesAggregator<T>
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
AbstractPathAggregator, CopyChunksProducer, DeleteChunksProducer, DistinctAggregator, GroupByAggregator, ListEntriesAggregator, OrderByAggregator, SpaceIteratorAggregator

public abstract class SpaceEntriesAggregator<T extends Serializable> extends Object implements Serializable, Cloneable
Since:
10.0
Author:
Niv Ingberg
See Also:
  • Field Details

    • NO_PATHS

      protected static final String[] NO_PATHS
      What an aggregator that reads no property value at all declares in getAggregatedPaths().
  • Constructor Details

    • SpaceEntriesAggregator

      public SpaceEntriesAggregator()
  • Method Details

    • getAlias

      public String getAlias()
    • as

      public SpaceEntriesAggregator as(String alias)
    • getDefaultAlias

      public abstract String getDefaultAlias()
    • aggregate

      public abstract void aggregate(SpaceEntriesAggregatorContext context)
    • getIntermediateResult

      public abstract T getIntermediateResult()
    • aggregateIntermediateResult

      public abstract void aggregateIntermediateResult(T partitionResult)
    • skipProcessedUidStore

      public boolean skipProcessedUidStore()
    • getFinalResult

      public Object getFinalResult()
    • skipFullScanSupported

      public boolean skipFullScanSupported(Map<String, SpaceIndex> indexes, boolean isMemoryScan)
    • getAggregatedPaths

      public String[] getAggregatedPaths()
      The property paths this aggregator reads out of every entry it is handed, when those values are all it reads - which lets a scan supply them out of the entry's blobstore block and never build the entry. An empty array means it reads no values at all; null means it wants the entry itself, and is what an aggregator says unless it overrides this.

      Returning paths is a promise about aggregate(SpaceEntriesAggregatorContext): that it reaches for nothing on the context but SpaceEntriesAggregatorContext.getPathValue(String) on these paths, the partition id, the uid and the type descriptor. The two ways of reaching the entry itself - SpaceEntriesAggregatorContext.getRawEntry() and SpaceEntriesAggregatorContext.getServerEntry() - are not among them and both throw when the entry was never built, so an aggregator that calls either fails loudly rather than aggregating over an entry it never saw. An aggregator that needs the entry declares no paths.

      The default is the slow branch on purpose: an aggregator added later reads whatever it likes until someone states otherwise here, and overriding this is that statement. It is made by one class for that class alone: a subclass inherits no declaration, whatever it overrides, and is served the entry unless it overrides this itself.

      Since:
      18.0.1
    • isIndexUsed

      public boolean isIndexUsed(Map<String, SpaceIndex> indexes, boolean isMemoryScan)
    • setAggregatorContext

      public void setAggregatorContext(SpaceEntriesAggregatorContext context)
    • maskPii

      protected void maskPii(IEntryPacket entryPacket)
      Field level security: omits the PII properties the user lacks read privilege for from an entry the aggregator built directly (e.g. from an index or storage scan) instead of via SpaceEntriesAggregatorContext.getRawEntry().
    • handleIntermediateResultOfMemoryStorage

      public void handleIntermediateResultOfMemoryStorage(TypeDataIndex index, TypeData entryType)
    • handleIntermediateResultOfDbStorage

      public void handleIntermediateResultOfDbStorage(ResultSet resultSet, ITypeDesc typeDesc) throws SQLException
      Throws:
      SQLException
    • getSQLQuery

      public String getSQLQuery(String typeName)
    • setRawEntryConverter

      protected void setRawEntryConverter(RawEntryConverter rawEntryConverter)
    • toObject

      protected Object toObject(RawEntry rawEntry)
    • clone

      public SpaceEntriesAggregator<T> clone()
      Overrides:
      clone in class Object