![JAR search and dependency download from the Maven repository](/logo.png)
com.gs.fw.common.mithra.cache.Cache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of reladomo Show documentation
Show all versions of reladomo Show documentation
Reladomo is an object-relational mapping framework.
/*
Copyright 2016 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
package com.gs.fw.common.mithra.cache;
import com.gs.collections.api.set.primitive.*;
import com.gs.fw.common.mithra.*;
import com.gs.fw.common.mithra.attribute.Attribute;
import com.gs.fw.common.mithra.attribute.update.AttributeUpdateWrapper;
import com.gs.fw.common.mithra.behavior.TemporalContainer;
import com.gs.fw.common.mithra.cache.offheap.MasterCacheUplink;
import com.gs.fw.common.mithra.cache.offheap.MasterSyncResult;
import com.gs.fw.common.mithra.extractor.Extractor;
import com.gs.fw.common.mithra.extractor.RelationshipHashStrategy;
import com.gs.fw.common.mithra.finder.ObjectWithMapperStack;
import com.gs.fw.common.mithra.finder.Operation;
import com.gs.fw.common.mithra.finder.bytearray.ByteArraySet;
import com.gs.fw.common.mithra.notification.listener.MithraNotificationListener;
import com.gs.fw.common.mithra.util.DoUntilProcedure;
import com.gs.fw.common.mithra.util.Filter;
import com.gs.fw.common.mithra.util.Filter2;
import com.gs.fw.common.mithra.util.MithraTupleSet;
import java.io.ObjectOutput;
import java.sql.Timestamp;
import java.util.Collection;
import java.util.List;
import java.util.Set;
public interface Cache
{
public static final int WEAK_THRESHOLD = 50000;
public int getId();
public List getAll();
public void forAll(DoUntilProcedure procedure);
public IndexReference getIndexRef(Attribute attribute);
public IndexReference getBestIndexReference(List attributes);
public boolean mapsToUniqueIndex(List attributes);
public int addIndex(String indexName, Extractor[] attributes);
public int addUniqueIndex(String indexName, Extractor[] attributes);
public int addTypedIndex(Extractor[] attributes, Class type, Class underlyingType);
public int addTypedUniqueIndex(Extractor[] attributes, Class type, Class underlyingType);
public boolean isFullCache();
public boolean isPartialCache();
public void clear();
public List getMany(int indexRef, MithraTupleSet dataHolders, Extractor[] extractors, boolean abortIfNotFound);
public void getManyDatedObjectsFromData(Object[] dataArray, int length, ObjectWithMapperStack[] asOfOpWithStacks);
public int getAverageReturnSize(int indexRef, int multiplier);
public int getMaxReturnSize(int indexRef, int multiplier);
public List get(int indexRef, Object dataHolder, Extractor[] extractors, boolean parallelAllowed);
public Object getAsOne(Object dataHolder, List extractors);
public Object getAsOne(Object dataHolder, Extractor[] extractors);
public Object getAsOne(Object srcObject, Object srcData, RelationshipHashStrategy relationshipHashStrategy, Timestamp asOfDate0, Timestamp asOfDate1);
public Object getAsOneByIndex(int indexRef, Object srcObject, Object srcData, RelationshipHashStrategy relationshipHashStrategy, Timestamp asOfDate0, Timestamp asOfDate1);
public List get(int indexRef, Set indexValues);
public List get(int indexRef, ByteArraySet indexValues);
public List get(int indexRef, IntSet intSetIndexValues);
public List get(int indexRef, DoubleSet doubleSetIndexValues);
public List get(int indexRef, BooleanSet booleanSetIndexValues);
public List get(int indexRef, LongSet longSetIndexValues);
public List get(int indexRef, ByteSet byteSetIndexValues);
public List get(int indexRef, CharSet charSetIndexValues);
public List get(int indexRef, FloatSet floatSetIndexValues);
public List get(int indexRef, ShortSet shortSetIndexValues);
public List get(int indexRef, Object indexValue);
public List get(int indexRef, int indexValue);
public List get(int indexRef, char indexValue);
public List get(int indexRef, double indexValue);
public List get(int indexRef, float indexValue);
public List get(int indexRef, boolean indexValue);
public List get(int indexRef, long indexValue);
public List getNulls(int indexRef);
/**
*
*
*
* @param indexRef refers NonUniqueIndex to be used to check presence
* @param keyHolder
* @param keyHolderNonDatedExtractors list of the extractors to hash keyHolder (note: order must match the order of the extractors on the Index extractors list or the hash code will not match.)
* @param filter
* @return
*/
public boolean contains(IndexReference indexRef, Object keyHolder, Extractor[] keyHolderNonDatedExtractors, final Filter2 filter);
public boolean isUnique(int indexReference);
public boolean isUniqueAndImmutable(int indexReference);
public void setMithraObjectPortal(MithraObjectPortal portal);
public Object getObjectFromData(MithraDataObject data);
public void getManyObjectsFromData(Object[] dataArray, int length, boolean weak);
public Object getObjectFromData(MithraDataObject data, Timestamp[] asOfDates);
public Object getObjectFromDataWithoutCaching(MithraDataObject data);
public Object getObjectFromDataWithoutCaching(MithraDataObject data, Timestamp[] asOfDates);
public Attribute[] getIndexAttributes(int indexRef);
// only called when object is read from database
public void reindex(MithraObject object, MithraDataObject newData, Object optionalBehavior, MithraDataObject optionalOldData);
// this is called when a mithra object is changed via a setter method outside a transaction
public void reindex(MithraObject object, AttributeUpdateWrapper updateWrapper);
public void remove(MithraObject object);
public Object put(MithraObject object);
public void removeAll(List objects);
public void removeAll(Filter filter);
public void removeUsingData(MithraDataObject object);
public boolean markDirty(MithraDataObject object);
public void markNonExistent(int indexReference, Collection
© 2015 - 2025 Weber Informatics LLC | Privacy Policy