Cache configuration changes
Adding ability to set a marshaller to cache configuration:
...
Code Block |
---|
|
/**
* Abstracted binary representation of objects.
*/
public interface IgniteObject {
/**
* Gets portable object type ID.
*
* @return Type ID.
*/
public int typeId();
/**
* Gets fully deserialized instance of portable object.
*
* @return Fully deserialized instance of portable object.
*/
@Nullable public <T> T deserialize() throws IgniteException;
/**
* Gets field value.
*
* @param fieldName Field name.
* @return Field value.
*/
@Nullable public <T> T field(String fieldName);
/**
* Checks whether field is set.
*
* @param fieldName Field name.
* @return {@code true} if field is set.
*/
public boolean hasField(String fieldName);
/**
* Gets the source input stream that was used to create this IgniteObject.
*/
public SeekableDataInput source();
} |
...
IgniteObjectMarshaller
Code Block |
---|
language | java |
---|
title | CacheObjectManager |
---|
|
/**
*
*/
public interface CacheObjectFactory {public interface IgniteObjectMarshaller extends Marshaller {
/**
* @param input Seekable input.
* @return Cache object.
*/
@Nullable public IgniteObject toIgniteObject(SeekableDataInput 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(ObjectString objtypeName);
} |
Code Block |
---|
|
public interface MarshallerEx extends Marshaller {
public CacheObjectFactory getCacheObjectFactory();
} |
Code Block |
---|
|
public interface SeekableDataInput extends DataInput {
public long position();
public void seek(long pos) throws IOException;
public void ensureOnHeap();
} |
...