Examples of IMutation


Examples of forestry.api.genetics.IMutation

public class ConverterIAlleles implements Converter {
    @Override
    public void convert(final Object value, final Map<Object, Object> output) {
        if (value instanceof IMutation) {
            IMutation mutation = (IMutation) value;

            IAllele allele1 = mutation.getAllele0();
            if (allele1 instanceof IAlleleSpecies) {
                Map<Object, Object> allelMap1 = Maps.newHashMap();
                convert(allele1, allelMap1);
                output.put("allele1", allelMap1);
            }
            IAllele allele2 = mutation.getAllele1();
            if (allele2 instanceof IAlleleSpecies) {
                Map<Object, Object> allelMap2 = Maps.newHashMap();
                convert(allele2, allelMap2);
                output.put("allele2", allelMap2);
            }
            output.put("chance", mutation.getBaseChance());
            output.put("specialConditions", mutation.getSpecialConditions().toArray());
        }

        if (value instanceof IAlleleSpecies) {
            convertAlleleSpecies((IAlleleSpecies) value, output);
        }
View Full Code Here

Examples of org.apache.cassandra.db.IMutation

                if (m instanceof RowMutation && type == Type.COUNTER)
                    throw new InvalidRequestException("Only counter mutations are allowed in COUNTER batches");

                Pair<String, ByteBuffer> key = Pair.create(m.getTable(), m.key());
                IMutation existing = mutations.get(key);

                if (existing == null)
                    mutations.put(key, m);
                else
                    existing.addAll(m);
            }
        }

        return mutations.values();
    }
View Full Code Here

Examples of org.apache.cassandra.db.IMutation

    {
        // Group mutation together, otherwise they won't get applied atomically
        for (IMutation m : statement.getMutations(variables, local, cl, attrs.getTimestamp(now, variables), true))
        {
            Pair<String, ByteBuffer> key = Pair.create(m.getKeyspaceName(), m.key());
            IMutation existing = mutations.get(key);

            if (existing == null)
            {
                mutations.put(key, m);
            }
            else
            {
                existing.addAll(m);
            }
        }
    }
View Full Code Here

Examples of org.apache.cassandra.db.IMutation

    {
        // Group mutation together, otherwise they won't get applied atomically
        for (IMutation m : statement.getMutations(variables, local, cl, attrs.getTimestamp(now, variables), true))
        {
            Pair<String, ByteBuffer> key = Pair.create(m.getKeyspaceName(), m.key());
            IMutation existing = mutations.get(key);

            if (existing == null)
            {
                mutations.put(key, m);
            }
            else
            {
                existing.addAll(m);
            }
        }
    }
View Full Code Here

Examples of org.apache.cassandra.db.IMutation

    {
        // Group mutation together, otherwise they won't get applied atomically
        for (IMutation m : statement.getMutations(variables, local, cl, attrs.getTimestamp(now, variables), true))
        {
            Pair<String, ByteBuffer> key = Pair.create(m.getKeyspaceName(), m.key());
            IMutation existing = mutations.get(key);

            if (existing == null)
            {
                mutations.put(key, m);
            }
            else
            {
                existing.addAll(m);
            }
        }
    }
View Full Code Here

Examples of org.apache.cassandra.db.IMutation

                if (m instanceof RowMutation && type == Type.COUNTER)
                    throw new InvalidRequestException("Only counter mutations are allowed in COUNTER batches");

                Pair<String, ByteBuffer> key = Pair.create(m.getTable(), m.key());
                IMutation existing = mutations.get(key);

                if (existing == null)
                    mutations.put(key, m);
                else
                    existing.addAll(m);
            }
        }

        return mutations.values();
    }
View Full Code Here

Examples of org.apache.cassandra.db.IMutation

                if (m instanceof RowMutation && type == Type.COUNTER)
                    throw new InvalidRequestException("Only counter mutations are allowed in COUNTER batches");

                Pair<String, ByteBuffer> key = Pair.create(m.getTable(), m.key());
                IMutation existing = mutations.get(key);

                if (existing == null)
                    mutations.put(key, m);
                else
                    existing.addAll(m);
            }
        }

        return mutations.values();
    }
View Full Code Here

Examples of org.apache.cassandra.db.IMutation

                if (m instanceof RowMutation && type == Type.COUNTER)
                    throw new InvalidRequestException("Only counter mutations are allowed in COUNTER batches");

                Pair<String, ByteBuffer> key = Pair.create(m.getTable(), m.key());
                IMutation existing = mutations.get(key);

                if (existing == null)
                    mutations.put(key, m);
                else
                    existing.addAll(m);
            }
        }

        return mutations.values();
    }
View Full Code Here

Examples of org.apache.cassandra.db.IMutation

                if (m instanceof RowMutation && type == Type.COUNTER)
                    throw new InvalidRequestException("Only counter mutations are allowed in COUNTER batches");

                Pair<String, ByteBuffer> key = Pair.create(m.getTable(), m.key());
                IMutation existing = mutations.get(key);

                if (existing == null)
                    mutations.put(key, m);
                else
                    existing.addAll(m);
            }
        }

        return mutations.values();
    }
View Full Code Here

Examples of org.apache.cassandra.db.IMutation

    {
        // Group mutation together, otherwise they won't get applied atomically
        for (IMutation m : statement.getMutations(variables, local, cl, attrs.getTimestamp(now, variables), true))
        {
            Pair<String, ByteBuffer> key = Pair.create(m.getKeyspaceName(), m.key());
            IMutation existing = mutations.get(key);

            if (existing == null)
            {
                mutations.put(key, m);
            }
            else
            {
                existing.addAll(m);
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.