Examples of TupleInput


Examples of com.sleepycat.bind.tuple.TupleInput

            ObjectMapper mapper = new ObjectMapper();

            while (objectsCursor.getNext(key, value, LockMode.RMW) == OperationStatus.SUCCESS)
            {
                UUID id = UUIDTupleBinding.getInstance().entryToObject(key);
                TupleInput input = TupleBinding.entryToInput(value);
                String type = input.readString();
                String json = input.readString();
                Map<String,Object> attributes = null;
                try
                {
                    attributes = mapper.readValue(json, MAP_TYPE_REFERENCE);
                }
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleInput

        TupleOutput tupleOutput = new TupleOutput();

        _configuredObjectBinding.objectToEntry(_object, tupleOutput);

        byte[] entryAsBytes = tupleOutput.getBufferBytes();
        TupleInput tupleInput = new TupleInput(entryAsBytes);

        ConfiguredObjectRecord storedObject = _configuredObjectBinding.entryToObject(tupleInput);
        assertEquals("Unexpected attributes", DUMMY_ATTRIBUTES_MAP, storedObject.getAttributes());
        assertEquals("Unexpected type", DUMMY_TYPE_STRING, storedObject.getType());
    }
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleInput

     *
     * @return the deserialized object
     */
    static public RepNodeImpl deserializeNode(byte[] bytes) {
        final NodeBinding binding = new NodeBinding();
        TupleInput tuple = new TupleInput(bytes);
        return binding.entryToObject(tuple);
    }
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleInput

        for (int i=0; i < hex.length(); i+=2) {
            int value = Character.digit(hex.charAt(i),16);
            value |= Character.digit(hex.charAt(i+1),16) << 4;
            buffer[i >> 1] = (byte)value;
        }
        TupleInput tuple = new TupleInput(buffer);
        return binding.entryToObject(tuple);
    }
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleInput

        writePackedInt(obsoleteSize);
    }

    public void countObsoleteInfo(final UtilizationTracker tracker,
                                  final DatabaseImpl nodeDb) {
        final TupleInput in = new TupleInput(this);
        while (in.available() > 0) {
            final long fileNumber = in.readPackedLong();
            long fileOffset = in.readPackedLong();
            final boolean isObsoleteLN = in.readBoolean();
            final int obsoleteSize = in.readPackedInt();
            tracker.countObsoleteNode
                (DbLsn.makeLsn(fileNumber, fileOffset),
                 isObsoleteLN ? LogEntryType.LOG_LN : LogEntryType.LOG_IN,
                 obsoleteSize, nodeDb);
        }
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleInput

    * Converts a database entry to an Fqn.
    */
   private Fqn makeKeyObject(DatabaseEntry entry) {

      Fqn name = Fqn.ROOT;
      TupleInput tupleInput = TupleBinding.entryToInput(entry);
      while (tupleInput.available() > 0) {
         String part = tupleInput.readString();
         name=new Fqn(name, part);
      }
      return name;
   }
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleInput

    */
   private Fqn makeKeyObject(DatabaseEntry entry)
   {

      Fqn name = Fqn.ROOT;
      TupleInput tupleInput = TupleBinding.entryToInput(entry);
      while (tupleInput.available() > 0)
      {
         String part = tupleInput.readString();
         name = Fqn.fromRelativeElements(name, part);
      }
      return name;
   }
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleInput

    */
   private Fqn makeKeyObject(DatabaseEntry entry)
   {

      Fqn name = Fqn.ROOT;
      TupleInput tupleInput = TupleBinding.entryToInput(entry);
      while (tupleInput.available() > 0)
      {
         String part = tupleInput.readString();
         name = Fqn.fromRelativeElements(name, part);
      }
      return name;
   }
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleInput

    */
   private Fqn makeKeyObject(DatabaseEntry entry)
   {

      Fqn name = Fqn.ROOT;
      TupleInput tupleInput = TupleBinding.entryToInput(entry);
      while (tupleInput.available() > 0)
      {
         String part = tupleInput.readString();
         name = new Fqn(name, part);
      }
      return name;
   }
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleInput

    */
   private Fqn makeKeyObject(DatabaseEntry entry)
   {

      Fqn name = Fqn.ROOT;
      TupleInput tupleInput = TupleBinding.entryToInput(entry);
      while (tupleInput.available() > 0)
      {
         String part = tupleInput.readString();
         name = Fqn.fromRelativeElements(name, part);
      }
      return name;
   }
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.