Examples of BobSerialize


Examples of net.sf.joafip.store.service.objectfortest.BobSerialize

  protected ObjectAndReferenced createObjectToSerialize() {
    final BobWithSerializeMethod bobWithSerializeMethod =
    /**/new BobWithSerializeMethod();
    final Object[] referenceds;
    if (BobWithSerializeMethod.unshared) {
      final BobSerialize bobSerialize = new BobSerialize();
      bobSerialize.setData("hello".getBytes());
      bobSerialize.setIndex(1000);
      bobWithSerializeMethod.setObject1(bobSerialize);
      bobWithSerializeMethod.setObject2(bobSerialize);
      referenceds = new Object[] { bobSerialize, bobSerialize };
    } else {
      final Integer valueOf10 = Integer.valueOf(10);
View Full Code Here

Examples of net.sf.joafip.store.service.objectfortest.BobSerialize

    assertNotSame("must not be same since unchared", object1, object2);
  }

  @Override
  protected ObjectAndReferenced createObjectToSerialize() {
    final BobSerialize object = new BobSerialize();
    object.setData("bonjour".getBytes());
    object.setIndex(456);
    final BobWithSerialPersistentFieldsUnshared bobWithSerialPersistentFieldsUnshared =
    /**/new BobWithSerialPersistentFieldsUnshared(object, object);
    final Object[] referenceds = new Object[] { object, object };
    return new ObjectAndReferenced(bobWithSerialPersistentFieldsUnshared,
        referenceds);
View Full Code Here

Examples of net.sf.joafip.store.service.objectfortest.BobSerialize

    final Bob1 bob1FromBob2 = bob2.getBob1();
    assertSame("must be same object", bob1, bob1FromBob2);
  }

  public void testDeepCopyWithArray() throws CopierException {
    final BobSerialize source = new BobSerialize();
    source.setData("hello world".getBytes());
    source.setIndex(12345);
    final Object copy = DeepCopier.getInstance().deepCopy(source, this,
        true);
    assertEquals("must be equals", source, copy);
    assertNotSame(MUST_NOT_BE_SAME_INSTANCE, source, copy);
  }
View Full Code Here

Examples of net.sf.joafip.store.service.objectfortest.BobSerialize

    assertTrue("file persistence must be closed after error",
        filePersistence.isClosed());
    // filePersistence.close();
    setUp();
    session.open();
    final BobSerialize bobSerialize = (BobSerialize) session
        .getObject(BIG_BOB_KEY);
    assertNull(bobSerialize);
    session.closeAndWait(EnumFilePersistenceCloseAction.SAVE);
  }
View Full Code Here

Examples of net.sf.joafip.store.service.objectfortest.BobSerialize

  private boolean saveSerialized() throws FilePersistenceException,
      FilePersistenceClassNotFoundException,
      FilePersistenceInvalidClassException,
      FilePersistenceDataCorruptedException,
      FilePersistenceNotSerializableException {
    final BobSerialize bobSerialize = new BobSerialize();
    // final Set<Long> set = new PLinkedHashSet<Long>();
    final Set<Long> set = new PLinkedTreeSet<Long>();
    for (long value = 1; value < 500; value++) {
      set.add(value);
    }
    bobSerialize.setObject(set);
    session.open();
    session.setObject(BIG_BOB_KEY, bobSerialize);
    Object toBigObject = null;
    String exportFilePath = null;
    boolean saveSucceed;
View Full Code Here

Examples of net.sf.joafip.store.service.objectfortest.BobSerialize

      FilePersistenceNotSerializableException,
      FilePersistenceTooBigForSerializationException {
    session.open();
    final Map<Integer, IBobSerialize> map = (Map<Integer, IBobSerialize>) session
        .getObject(KEY);
    final IBobSerialize bob = new BobSerialize();
    map.put(index, bob);
    final byte[] data = createData(length, value);
    bob.setData(data);
    session.close(EnumFilePersistenceCloseAction.SAVE);
    return data;
  }
View Full Code Here

Examples of net.sf.joafip.store.service.objectfortest.BobSerialize

    super(name);
  }

  @Override
  protected IBobSerialize createObject() {
    return new BobSerialize();
  }
View Full Code Here

Examples of net.sf.joafip.store.service.objectfortest.BobSerialize

    bobList.add(bob);
  }

  private IBobSerialize newBob() {
    IBobSerialize bob;
    bob = new BobSerialize();
    return bob;
  }
View Full Code Here

Examples of net.sf.joafip.store.service.objectfortest.BobSerialize

      FilePersistenceClassNotFoundException,
      FilePersistenceInvalidClassException,
      FilePersistenceDataCorruptedException,
      FilePersistenceNotSerializableException, ProxyException,
      FilePersistenceTooBigForSerializationException {
    IBobSerialize bobSerialize = new BobSerialize();
    session.open();
    session.setObject(BOB1, bobSerialize);
    session.close(EnumFilePersistenceCloseAction.SAVE);

    session.open();
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.