Load all the Distribution set.

@param startIndex
as page start
@param count
as total data
5480
@Override
    protected List<ProxyDistribution> loadBeans(final int startIndex, final int count) {
        Page<DistributionSet> distBeans;
        final List<ProxyDistribution> proxyDistributions = new ArrayList<>();
        if (startIndex == 0 && firstPageDistributionSets != null) {
            distBeans = firstPageDistributionSets;
        } else if (pinnedTarget != null) {
            final DistributionSetFilterBuilder distributionSetFilterBuilder = new DistributionSetFilterBuilder()
                    .setIsDeleted(false).setIsComplete(true).setSearchText(searchText)
                    .setSelectDSWithNoTag(noTagClicked).setTagNames(distributionTags);

            distBeans = getDistributionSetManagement().findByFilterAndAssignedInstalledDsOrderedByLinkTarget(
                    new OffsetBasedPageRequest(startIndex, count, sort), distributionSetFilterBuilder,
                    pinnedTarget.getControllerId());
        } else if (distributionTags.isEmpty() && StringUtils.isEmpty(searchText) && !noTagClicked) {
            // if no search filters available
            distBeans = getDistributionSetManagement()
                    .findByCompleted(new OffsetBasedPageRequest(startIndex, count, sort), true);
        } else {
            final DistributionSetFilter distributionSetFilter = new DistributionSetFilterBuilder().setIsDeleted(false)
                    .setIsComplete(true).setSearchText(searchText).setSelectDSWithNoTag(noTagClicked)
                    .setTagNames(distributionTags).build();
            distBeans = getDistributionSetManagement().findByDistributionSetFilter(
                    new OffsetBasedPageRequest(startIndex, count, sort), distributionSetFilter);
        }

        for (final DistributionSet distributionSet : distBeans) {
            final ProxyDistribution proxyDistribution = new ProxyDistribution();
            proxyDistribution.setName(distributionSet.getName());
            proxyDistribution.setDescription(distributionSet.getDescription());
            proxyDistribution.setId(distributionSet.getId());
            proxyDistribution.setDistId(distributionSet.getId());
            proxyDistribution.setVersion(distributionSet.getVersion());
            proxyDistribution.setCreatedDate(SPDateTimeUtil.getFormattedDate(distributionSet.getCreatedAt()));
            proxyDistribution.setLastModifiedDate(SPDateTimeUtil.getFormattedDate(distributionSet.getLastModifiedAt()));
            proxyDistribution.setCreatedByUser(UserDetailsFormatter.loadAndFormatCreatedBy(distributionSet));
            proxyDistribution.setModifiedByUser(UserDetailsFormatter.loadAndFormatLastModifiedBy(distributionSet));
            proxyDistribution.setNameVersion(
                    HawkbitCommonUtil.getFormattedNameVersion(distributionSet.getName(), distributionSet.getVersion()));
            proxyDistributions.add(proxyDistribution);
        }
        return proxyDistributions;
    }
988928
void initResultIndex() {

        int startIndex = 0;
        if ((m_pageIndex > 0) && (m_pageSize > 0)) {
            startIndex = (m_pageIndex - 1) * m_pageSize;
        }

        m_resultIndex = startIndex > m_resultSize ? m_resultSize : startIndex;
    }
1087515
protected void setParseInformation(int index, int start) {
        this.buffIndex = index;
        this.offset = start;

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Set parse information " + this.buffIndex + " " + this.offset);
        }
    }
1330427
private void init( List<T> list ) {
		this.list = list;
		indexes = new int[ list.size() ];
		counters = new int[ list.size() ];

		for( int i = 0; i < indexes.length ; i++ ) {
			counters[i] = indexes[i] = i;
		}

		total = 1;
		for( int i = 2; i <= indexes.length ; i++ ) {
			total *= i;
		}

		permutation = 0;
	}
410864
private final void init(int nbuckets, int initBucketSize) {
    buckets = new Element[nbuckets][];
    counts = new int[nbuckets];
    this.initBucketSize = initBucketSize;
  }
697927
public Binder drop(int index, int count) {
        return new Binder(this, new Drop(index, Arrays.copyOfRange(type().parameterArray(), index, index + count)));
    }
530207
private void loadIndexInMemory() throws Exception {
		// create the memory objects with the appropriate initial size
		if (numProductCentroids <= 256) {
			pqByteCodes = new TByteArrayList(maxNumVectors * numSubVectors);
		} else {
			pqShortCodes = new TShortArrayList(maxNumVectors * numSubVectors);
		}
		long start = System.currentTimeMillis();
		System.out.println("Loading persistent index in memory.");

		DatabaseEntry foundKey = new DatabaseEntry();
		DatabaseEntry foundData = new DatabaseEntry();

		ForwardCursor cursor = null;
		if (useDiskOrderedCursor) { // disk ordered cursor
			DiskOrderedCursorConfig docc = new DiskOrderedCursorConfig();
			cursor = iidToPqDB.openCursor(docc);
		} else {
			cursor = iidToPqDB.openCursor(null, null);
		}

		int counter = 0;
		while (cursor.getNext(foundKey, foundData, LockMode.DEFAULT) == OperationStatus.SUCCESS
				&& counter < maxNumVectors) {
			TupleInput input = TupleBinding.entryToInput(foundData);

			if (numProductCentroids <= 256) {
				byte[] code = new byte[numSubVectors];
				for (int i = 0; i < numSubVectors; i++) {
					code[i] = input.readByte();
				}
				pqByteCodes.add(code); // update ram based index
			} else {
				short[] code = new short[numSubVectors];
				for (int i = 0; i < numSubVectors; i++) {
					code[i] = input.readShort();
				}
				pqShortCodes.add(code); // update ram based index
			}
			counter++;
			if (counter % 1000 == 0) {
				System.out.println(counter + " vectors loaded in memory!");
			}
		}
		cursor.close();
		long end = System.currentTimeMillis();
		System.out.println(counter + " vectors loaded in " + (end - start) + " ms!");
	}
1291461
private void loadIndexInMemory() throws Exception {
		long start = System.currentTimeMillis();
		System.out.println("Loading persistent index in memory.");

		DatabaseEntry foundKey = new DatabaseEntry();
		DatabaseEntry foundData = new DatabaseEntry();

		ForwardCursor cursor = null;
		if (useDiskOrderedCursor) { // disk ordered cursor
			DiskOrderedCursorConfig docc = new DiskOrderedCursorConfig();
			cursor = iidToVectorDB.openCursor(docc);
		} else {
			cursor = iidToVectorDB.openCursor(null, null);
		}

		int counter = 0;
		while (cursor.getNext(foundKey, foundData, null) == OperationStatus.SUCCESS
				&& counter < maxNumVectors) {
			TupleInput input = TupleBinding.entryToInput(foundData);
			double[] vector = new double[vectorLength];
			for (int i = 0; i < vectorLength; i++) {
				vector[i] = input.readDouble();
			}
			// update ram based index
			vectorsList.add(vector);
			counter++;
			if (counter % 1000 == 0) {
				System.out.println(counter + " vectors loaded in memory!");
			}
		}
		cursor.close();
		long end = System.currentTimeMillis();
		System.out.println(counter + " vectors loaded in " + (end - start) + " ms!");
	}
4937
public DataArray array(File[] files, int start, int count) {
		return STRUCT.fromMapsAndCollections(list(files, start, count));
	}
19133
protected void doLoad(int offset, int limit) {
        dataSource.load(new LoadConfig<>(offset, limit, table.getView().getSortContext(),
                table.getView().getOpenCategories()), new LoadCallback<T>() {
            @Override
            public void onSuccess(LoadResult<T> loadResult) {
                setOffset(loadResult.getOffset());
                totalRows = loadResult.getTotalLength();
                table.setVisibleRange(loadResult.getOffset(), loadResult.getData().size());
                table.loaded(loadResult.getOffset(), loadResult.getData());
                updateUi();
            }

            @Override
            public void onFailure(Throwable caught) {
                GWT.log("Load failure", caught);
                //TODO: What we need to do on failure? May be clear table?
            }
        });
    }
358379
public synchronized void putAll(Collection<U> data, int startIndex) {
    putAll(new SerialArrayList<U>(factory, data), startIndex);
  }
496941
public final void insertNullElementsAt(int index, int count)
  {
    if (tc.isEntryEnabled())
      SibTr.entry(
        tc,
        "insertNullElementsAt",
        new Object[] { new Integer(index), new Integer(count)});

    for (int i = index; i < index + count; i++)
      add(i, null);

    if (tc.isEntryEnabled())
      SibTr.exit(tc, "insertNullElementsAt");
  }
1057911
public void set(int index, int count, boolean value)
    {
        for (int ii=0;ii<count;ii++)
        {
            set(ii+index, value);
        }
    }
1360142
public void populateTableByDistributionSet(final DistributionSet distributionSet) {
        removeAllItems();
        if (distributionSet == null) {
            return;
        }

        final Container dataSource = getContainerDataSource();
        final List<TargetFilterQuery> filters = distributionSet.getAutoAssignFilters();
        filters.forEach(query -> {
            final Object itemId = dataSource.addItem();
            final Item item = dataSource.getItem(itemId);
            item.getItemProperty(TFQ_NAME).setValue(query.getName());
            item.getItemProperty(TFQ_QUERY).setValue(query.getQuery());
        });

    }
1185053
public void load(AjaxRequestTarget ajaxRequestTarget, int index)
	{
		ajaxRequestTarget.appendJavaScript(this.load(index).render().toString());
	}
1098020
public void init() throws ConfigurationException {
		if(index == null) {
			throw new ConfigurationException("No index target");
		}
		if(!index.isUpdatable()) {
			throw new ConfigurationException("ResourceIndex is not updatable");
		}
		if(incoming == null) {
			throw new ConfigurationException("No incoming");			
		}
		if(runInterval > 0) {
			thread = new UpdateThread(this,runInterval);
			thread.start();
		}
	}
346858
public void load(List<E> result) {
        ++pageCount;
        if (this.result == null || this.result.isEmpty()) {
            this.result = result;
        } else {
            this.result.addAll(result);
        }
    }