Search in sources :

Example 1 with BinaryRawWriter

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

the class IgfsPathSummary method writeBinary.

/**
 * {@inheritDoc}
 */
@Override
public void writeBinary(BinaryWriter writer) throws BinaryObjectException {
    BinaryRawWriter rawWriter = writer.rawWriter();
    rawWriter.writeInt(filesCnt);
    rawWriter.writeInt(dirCnt);
    rawWriter.writeLong(totalLen);
    IgfsUtils.writePath(rawWriter, path);
}
Also used : BinaryRawWriter(org.apache.ignite.binary.BinaryRawWriter)

Example 2 with BinaryRawWriter

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

the class IgfsMetaDirectoryCreateProcessor method writeBinary.

/**
 * {@inheritDoc}
 */
@Override
public void writeBinary(BinaryWriter writer) throws BinaryObjectException {
    BinaryRawWriter out = writer.rawWriter();
    out.writeLong(accessTime);
    out.writeLong(modificationTime);
    IgfsUtils.writeProperties(out, props);
    out.writeString(childName);
    if (childName != null)
        IgfsUtils.writeListingEntry(out, childEntry);
}
Also used : BinaryRawWriter(org.apache.ignite.binary.BinaryRawWriter)

Example 3 with BinaryRawWriter

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

the class IgfsBlockLocationImpl method writeBinary.

/**
 * {@inheritDoc}
 */
@Override
public void writeBinary(BinaryWriter writer) throws BinaryObjectException {
    BinaryRawWriter rawWriter = writer.rawWriter();
    assert names != null;
    assert hosts != null;
    rawWriter.writeLong(start);
    rawWriter.writeLong(len);
    rawWriter.writeBoolean(nodeIds != null);
    if (nodeIds != null) {
        rawWriter.writeInt(nodeIds.size());
        for (UUID nodeId : nodeIds) U.writeUuid(rawWriter, nodeId);
    }
    rawWriter.writeInt(names.size());
    for (String name : names) rawWriter.writeString(name);
    rawWriter.writeInt(hosts.size());
    for (String host : hosts) rawWriter.writeString(host);
}
Also used : UUID(java.util.UUID) BinaryRawWriter(org.apache.ignite.binary.BinaryRawWriter)

Example 4 with BinaryRawWriter

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

the class IgfsDirectoryInfo method writeBinary.

/**
 * {@inheritDoc}
 */
@Override
public void writeBinary(BinaryWriter writer) throws BinaryObjectException {
    BinaryRawWriter out = writer.rawWriter();
    writeBinary(out);
    if (listing != null) {
        out.writeBoolean(true);
        out.writeInt(listing.size());
        for (Map.Entry<String, IgfsListingEntry> entry : listing.entrySet()) {
            out.writeString(entry.getKey());
            IgfsUtils.writeListingEntry(out, entry.getValue());
        }
    } else
        out.writeBoolean(false);
}
Also used : HashMap(java.util.HashMap) Map(java.util.Map) BinaryRawWriter(org.apache.ignite.binary.BinaryRawWriter)

Example 5 with BinaryRawWriter

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

the class IgfsListingEntry method writeBinary.

/**
 * {@inheritDoc}
 */
@Override
public void writeBinary(BinaryWriter writer) throws BinaryObjectException {
    BinaryRawWriter out = writer.rawWriter();
    BinaryUtils.writeIgniteUuid(out, id);
    out.writeBoolean(dir);
}
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