Package org.springmodules.javaspaces

Examples of org.springmodules.javaspaces.JavaSpaceCallback


   * Checks whether the space is alive and accessible.
   * @see {@link http://gigaspaces.com/docs/JavaDoc/com/j_spaces/core/IJSpace.html#ping()}
   */
  public void ping()
  {
    execute(new JavaSpaceCallback() {
      public Object doInSpace(JavaSpace js, Transaction tx) throws RemoteException{
        ((IJSpace)js).ping();
        return null;
      }
    });
View Full Code Here


   * @return the POJO
   * @see {@link http://gigaspaces.com/docs/JavaDoc/com/j_spaces/core/IJSpace.html#update(net.jini.core.entry.Entry,net.jini.core.transaction.Transaction,long,long)}
   */
  public Object update(final Object newPojo, final long lease, final long timeout)
  {
    return (Object) execute(new JavaSpaceCallback() {
      public Object doInSpace(JavaSpace js, Transaction tx) throws RemoteException, InterruptedException, TransactionException, UnusableEntryException{
        return ((IJSpace)js).update(newPojo, tx, lease, timeout);

      }
    });
View Full Code Here

   * @return the POJO
   * @see {@link http://gigaspaces.com/docs/JavaDoc/com/j_spaces/core/IJSpace.html#update(net.jini.core.entry.Entry,net.jini.core.transaction.Transaction,long,long,int)}
   */
  public Object update(final Object newEntry, final long lease, final long timeout, final int updateModifiers)
  {
    return (Object) execute(new JavaSpaceCallback() {
      public Object doInSpace(JavaSpace js, Transaction tx) throws RemoteException, InterruptedException, TransactionException, UnusableEntryException{
        return ((IJSpace)js).updatenewEntry,
                                      tx,
                                      lease,
                                      timeout,
View Full Code Here

   *         object, in case of an exception
   * @see {@link http://gigaspaces.com/docs/JavaDoc/com/j_spaces/core/IJSpace.html#writeMultiple(net.jini.core.entry.Entry[],net.jini.core.transaction.Transaction,long)}
   */
  public Object[] updateMultiple(final Object[] pojos, final long[] leases)
  {
    return (Object[]) execute(new JavaSpaceCallback() {
      public Object doInSpace(JavaSpace js, Transaction tx) throws RemoteException, InterruptedException, TransactionException, UnusableEntryException{
        return ((IJSpace)js).updateMultiple(pojos, tx, leases);
      }
    });
  }
View Full Code Here

   *         object, in case of an exception
   * @see {@link http://gigaspaces.com/docs/JavaDoc/com/j_spaces/core/IJSpace.html#writeMultiple(net.jini.core.entry.Entry[],net.jini.core.transaction.Transaction,long,int)}
   */
  public Object[] updateMultiple(final Object[] pojos, final long[] leases, final int updateModifiers)
  {
    return (Object[]) execute(new JavaSpaceCallback() {
      public Object doInSpace(JavaSpace js, Transaction tx) throws RemoteException, InterruptedException, TransactionException, UnusableEntryException{
        return ((IJSpace)js).updateMultiplepojos,
                                              tx,
                                              leases,
                                              updateModifiers);
View Full Code Here

   * @return boolean true if this space secured, otherwise false.
   * @see {@link http://gigaspaces.com/docs/JavaDoc/com/j_spaces/core/IJSpace.html#isSecured()}
   */
  public boolean isSecured()
  {
    return ((Boolean) execute(new JavaSpaceCallback() {
      public Object doInSpace(JavaSpace js, Transaction tx) throws RemoteException{
        return new Boolean(((IJSpace)js).isSecured());
      }
    })).booleanValue();
  }
View Full Code Here

   * @pram className - name of class to delete.
   * @see {@link http://gigaspaces.com/docs/JavaDoc/com/j_spaces/core/IJSpace.html#dropClass(java.lang.String)}
   */
  public void dropClass(final String className)
  {
    execute(new JavaSpaceCallback() {
      public Object doInSpace(JavaSpace js, Transaction tx) throws RemoteException{
        try
        {
          ((IJSpace)js).dropClass(className);
        }
View Full Code Here

   * @return Returns true if the proxy embedded, otherwise false.
   * @see {@link http://gigaspaces.com/docs/JavaDoc/com/j_spaces/core/IJSpace.html#isEmbedded()}
   */
  public boolean isEmbedded()
  {
    return ((Boolean) execute(new JavaSpaceCallback() {
      public Object doInSpace(JavaSpace js, Transaction tx) throws RemoteException{
         return new Boolean(((IJSpace)js).isEmbedded());
      }
    })).booleanValue();
  }
View Full Code Here

   * @param enable true enable Optimistic Lock protocol, false disable.
   * @see {@link http://gigaspaces.com/docs/JavaDoc/com/j_spaces/core/IJSpace.html#isOptimisticLocking(boolean)}
   */
  public void setOptimisticLocking(final boolean enable)
  {
    execute(new JavaSpaceCallback() {
      public Object doInSpace(JavaSpace js, Transaction tx) throws RemoteException{
        ((IJSpace)js).setOptimisticLocking(enable);
        return null;
      }
    });
View Full Code Here

   * @return true Optimistic Lock enabled, otherwise false.
   * @see {@link http://gigaspaces.com/docs/JavaDoc/com/j_spaces/core/IJSpace.html#isOptimisticLockingEnabled()}
   */
  public boolean isOptimisticLockingEnabled()
  {
    return ((Boolean) execute(new JavaSpaceCallback() {
      public Object doInSpace(JavaSpace js, Transaction tx) throws RemoteException{
        return new Boolean(((IJSpace)js).isOptimisticLockingEnabled());
      }
    })).booleanValue();
  }
View Full Code Here

TOP

Related Classes of org.springmodules.javaspaces.JavaSpaceCallback

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.