Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Cache configuration changes

Adding ability to set a marshaller to cache configuration:

...

Code Block
languagejava
public class CacheConfiguration {
    // ...
 
    public void setMarshaller(Marshaller marshaller) {...}
    public Marshaller getMarshaller() {...}
 
    // ...
}

 

Public API: New Interface

Code Block
languagejavatitleCacheObjectManager
/**
 * Abstracted binary representation of objects.
 */
public abstractinterface class CacheObjectManager extends GridCacheManagerAdapter IgniteObject {
    /**
     * ChecksGets whetherportable thisobject functionality is globally supportedtype ID.
     *
     * @return {@code true} if enabledType ID.
     */
    public abstractint boolean isFieldsIndexingEnabledtypeId();


    /**
     * @paramGets objfully Keydeserialized value.
instance     * @param userObj If {@code true} then given object is object provided by user and should be copiedof portable object.
     *
     * before@return storedFully indeserialized cache.
instance of    * @return Cache key portable object.
     */
    @Nullable public abstract<T> KeyCacheObjectT toCacheKeyObjectdeserialize(Object) obj, boolean userObj)throws IgniteException;


    /**
     * @paramGets objfield Objectvalue.
     * @param userObj If {@code true} then given object is object provided by user and should be copied
     * before@param storedfieldName inField cachename.
     * @return CacheField objectvalue.
     */
    @Nullable public abstract<T> CacheObjectT toCacheObjectfield(@Nullable Object obj, boolean userObjString fieldName);


    /**
     * @paramChecks whether typefield Objectis type.set.
     *
     * @param bytesfieldName ObjectField bytesname.
     * @return Cache object{@code true} if field is set.
     */
    public abstractboolean CacheObject toCacheObjecthasField(byte type, byte[] bytesString fieldName);
 

    /**
     * @param valPtr Value pointer Gets the source input stream that was used to create this IgniteObject.
     */
 @param  tmp Ifpublic {@code true} can return temporary instance which is valid while entry lock is held.SeekableDataInput source();
}

 

IgniteObjectMarshaller
 

Code Block
languagejava
public interface IgniteObjectMarshaller extends Marshaller {    
    /**
     * @param @returninput CacheSeekable objectinput.
     * @throws@return IgniteCheckedExceptionCache If failedobject.
     */
    @Nullable public abstractIgniteObject CacheObject toCacheObjecttoIgniteObject(long valPtr, boolean tmp) throws IgniteCheckedExceptionSeekableDataInput input);


    /**
     * @param typeNameinput TypeSeekable nameinput.
     * @return TypeCache IDobject.
     */
    @Nullable public abstractIgniteObject int typeId(String typeNametoIgniteObject(byte[] data);


    /**
     * @param objtypeName Object to get type ID forType name.
     * @return Type ID.
     */
    public abstract int typeId(Object obj);
...
}

...

String typeName);}
Code Block
languagejava
public interface SeekableDataInput extends DataInput {
    public long position();
 
    public void seek(long pos) throws IOException;
 
    public void ensureOnHeap();
}