Package com.sun.sgs.impl.kernel

Examples of com.sun.sgs.impl.kernel.LockingAccessCoordinator$LockRequest


  super.init();
    }

    /** Creates a {@code LockingAccessCoordinator}. */
    protected LockingAccessCoordinator createAccessCoordinator() {
  return new LockingAccessCoordinator(
      properties, txnProxy, profileCollector);
    }
View Full Code Here


    /* -- Test constructor -- */

    @Test(expected=NullPointerException.class)
    public void testConstructorNullProperties() {
  new LockingAccessCoordinator(null, txnProxy, profileCollector);
    }
View Full Code Here

  new LockingAccessCoordinator(null, txnProxy, profileCollector);
    }

    @Test(expected=NullPointerException.class)
    public void testConstructorNullTxnProxy() {
  new LockingAccessCoordinator(properties, null, profileCollector);
    }
View Full Code Here

  new LockingAccessCoordinator(properties, null, profileCollector);
    }

    @Test(expected=NullPointerException.class)
    public void testConstructorNullProfileCollector() {
  new LockingAccessCoordinator(properties, txnProxy, null);
    }
View Full Code Here

  String[] values = { "0", "-37" };
  for (String value : values) {
      properties.setProperty(
    LockingAccessCoordinator.LOCK_TIMEOUT_PROPERTY, value);
      try {
    new LockingAccessCoordinator(
        properties, txnProxy, profileCollector);
    fail("Expected IllegalArgumentException");
      } catch (IllegalArgumentException e) {
    System.err.println(e);
      }
View Full Code Here

  String[] values = { "0", "-50" };
  for (String value : values) {
      properties.setProperty(
    LockingAccessCoordinator.NUM_KEY_MAPS_PROPERTY, value);
      try {
    new LockingAccessCoordinator(
        properties, txnProxy, profileCollector);
    fail("Expected IllegalArgumentException");
      } catch (IllegalArgumentException e) {
    System.err.println(e);
      }
View Full Code Here

            attributes.addAttribute(WFSSchema.NAMESPACE.toString(),
                attrs[1].getName(), null, "string", attrs[1].getFixed());
            attributes.addAttribute(WFSSchema.NAMESPACE.toString(),
                attrs[3].getName(), null, "string", "ALL");

            LockRequest lockRequest = (LockRequest) value;

            if ((lockRequest != null) && (lockRequest.getDuration() > 0)) {
                attributes.addAttribute(WFSSchema.NAMESPACE.toString(),
                    elems[2].getName(), null, "integer",
                    "" + lockRequest.getDuration());
            }

            output.startElement(element.getNamespace(), element.getName(),
                attributes);

            Object[] t = new Object[2];

            for (int i = 0; i < lockRequest.getTypeNames().length; i++) {
                t[0] = lockRequest.getTypeNames()[i];
                t[1] = lockRequest.getFilters()[i];
                elems[0].getType().encode(elems[0], t, output, hints);
            }

            output.endElement(element.getNamespace(), element.getName());
        }
View Full Code Here

            Object[] t = (Object[]) value;
            AttributesImpl attributes = new AttributesImpl();
            attributes.addAttribute(WFSSchema.NAMESPACE.toString(),
                attrs[1].getName(), null, "string", (String) t[0]);

            LockRequest lockRequest = (LockRequest) value;

            if ((lockRequest != null) && (lockRequest.getDuration() > 0)) {
                attributes.addAttribute(WFSSchema.NAMESPACE.toString(),
                    elems[2].getName(), null, "integer",
                    "" + lockRequest.getDuration());
            }

            output.startElement(element.getNamespace(), element.getName(),
                attributes);
            elems[0].getType().encode(elems[0], t[1], output, hints);
View Full Code Here

TOP

Related Classes of com.sun.sgs.impl.kernel.LockingAccessCoordinator$LockRequest

Copyright © 2018 www.massapicom. 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.