Search in sources :

Example 11 with BinaryRawWriter

use of org.apache.ignite.binary.BinaryRawWriter in project ignite by apache.

the class WebSessionEntity method writeBinary.

/**
 * {@inheritDoc}
 */
@Override
public void writeBinary(final BinaryWriter writer) throws BinaryObjectException {
    final BinaryRawWriter rawWriter = writer.rawWriter();
    rawWriter.writeString(id);
    rawWriter.writeLong(createTime);
    rawWriter.writeLong(accessTime);
    rawWriter.writeInt(maxInactiveInterval);
    rawWriter.writeMap(attrs);
}
Also used : BinaryRawWriter(org.apache.ignite.binary.BinaryRawWriter)

Example 12 with BinaryRawWriter

use of org.apache.ignite.binary.BinaryRawWriter in project ignite by apache.

the class WebSessionAttributeProcessor method writeBinary.

/**
 * {@inheritDoc}
 */
@Override
public void writeBinary(final BinaryWriter writer) throws BinaryObjectException {
    final BinaryRawWriter rawWriter = writer.rawWriter();
    rawWriter.writeMap(updatesMap);
    rawWriter.writeLong(accessTime);
    rawWriter.writeBoolean(maxIntervalChanged);
    if (maxIntervalChanged)
        rawWriter.writeInt(maxInactiveInterval);
}
Also used : BinaryRawWriter(org.apache.ignite.binary.BinaryRawWriter)

Example 13 with BinaryRawWriter

use of org.apache.ignite.binary.BinaryRawWriter in project ignite by apache.

the class GridBinaryMarshalerAwareTestClass method writeBinary.

/**
 * {@inheritDoc}
 */
@Override
public void writeBinary(BinaryWriter writer) throws BinaryObjectException {
    writer.writeString("s", s);
    BinaryRawWriter raw = writer.rawWriter();
    raw.writeString(sRaw);
}
Also used : BinaryRawWriter(org.apache.ignite.binary.BinaryRawWriter)

Example 14 with BinaryRawWriter

use of org.apache.ignite.binary.BinaryRawWriter in project ignite by apache.

the class BinaryTreeMap method writeBinary.

/**
 * {@inheritDoc}
 */
@Override
public void writeBinary(BinaryWriter writer) throws BinaryObjectException {
    BinaryRawWriter rawWriter = writer.rawWriter();
    rawWriter.writeObject(map.comparator());
    int size = map.size();
    rawWriter.writeInt(size);
    for (Map.Entry<Object, Object> entry : ((TreeMap<Object, Object>) map).entrySet()) {
        rawWriter.writeObject(entry.getKey());
        rawWriter.writeObject(entry.getValue());
    }
}
Also used : TreeMap(java.util.TreeMap) TreeMap(java.util.TreeMap) Map(java.util.Map) BinaryRawWriter(org.apache.ignite.binary.BinaryRawWriter)

Example 15 with BinaryRawWriter

use of org.apache.ignite.binary.BinaryRawWriter in project ignite by apache.

the class IgfsMetaDirectoryListingAddProcessor method writeBinary.

/**
 * {@inheritDoc}
 */
@Override
public void writeBinary(BinaryWriter writer) throws BinaryObjectException {
    BinaryRawWriter out = writer.rawWriter();
    out.writeString(fileName);
    IgfsUtils.writeListingEntry(out, entry);
}
Also used : BinaryRawWriter(org.apache.ignite.binary.BinaryRawWriter)

Aggregations

BinaryRawWriter (org.apache.ignite.binary.BinaryRawWriter)36 Map (java.util.Map)4 HashMap (java.util.HashMap)2 TreeMap (java.util.TreeMap)2 IOException (java.io.IOException)1 Array (java.lang.reflect.Array)1 SimpleEntry (java.util.AbstractMap.SimpleEntry)1 ArrayList (java.util.ArrayList)1 Arrays (java.util.Arrays)1 Collection (java.util.Collection)1 LinkedHashMap (java.util.LinkedHashMap)1 LinkedHashSet (java.util.LinkedHashSet)1 LinkedList (java.util.LinkedList)1 Objects (java.util.Objects)1 Set (java.util.Set)1 UUID (java.util.UUID)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 BiConsumer (java.util.function.BiConsumer)1 Consumer (java.util.function.Consumer)1 Function (java.util.function.Function)1