Examples of checkLock()


Examples of com.gentics.cr.lucene.indexer.index.LuceneSingleIndexLocation.checkLock()

      LuceneSingleIndexLocation indexLocation = (LuceneSingleIndexLocation) location;
      File indexDirectory = new File(indexLocation.getReopenFilename()).getParentFile();
      File writeLock = null;
      boolean weWroteTheWriteLock = false;
      try {
        indexLocation.checkLock();
        if (indexDirectory.canWrite()) {
          writeLock = new File(indexDirectory, "write.lock");
          if (writeLock.createNewFile()) {
            weWroteTheWriteLock = true;
          } else {
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.core.PacketReference.checkLock()

        if (uid == null) return null;
        Destination d = (Destination)destinationList.get(uid);
        if (d == null) return null;
        PacketReference ref = (PacketReference)d.destMessages.get(id);
        if (ref == null) return null;
        return ref.checkLock(wait);
    }
   
    public  PacketReference getMessage(SysMessageID id)
    {       
      return (PacketReference)destMessages.get(id);      
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.core.PacketReference.checkLock()

        if (uid == null) return false;
        Destination d = (Destination)destinationList.get(uid);
        if (d == null) return false;
        PacketReference ref = (PacketReference)d.destMessages.get(id);
        if (ref == null) return false;
        return (ref.checkLock(false) == null);
    }
   
    /**
     * adds information on the new message to the globals tables.
     * It may or may not change the size (since the size may
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.core.PacketReference.checkLock()

                    // open txn, remove
                    itr.remove();
                }
            }
            //check in takeover processing
            if (p.checkLock(false) == null) {
                itr.remove();
            }
        }

        ArrayList returnmsgs = new ArrayList();
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.core.PacketReference.checkLock()

                ref = (PacketReference)destMessages.get(sysid);
                refs = "null";
                if (ref != null) {
                    refs = "local="+ref.isLocal()+",invalid="+ref.isInvalid()+
                           ",destroyed="+ref.isDestroyed()+",overrided="+ref.isOverrided()+
                           ",overriding="+ref.isOverriding()+",locked="+(ref.checkLock(false)==null);
                }
                v.add(sysid.toString()+"  ref="+refs);
            }
            ht.put("Messages", v);
        }
View Full Code Here

Examples of org.apache.isis.core.metamodel.adapter.ObjectAdapter.checkLock()

            if (session == null && action.isVisible(new AnonymousSession(), object, where).isVetoed()) {
                session = new AnonymousSession();
            }

            final Version originalVersion = context.getVersion(version);
            object.checkLock(originalVersion);
            if (entryState.isValid()) {
                final boolean hasResult = invokeMethod(context, resultName, object, action, entryState);
                String view = context.getParameter(hasResult ? "_" + VIEW : "_" + VOID);

                final int questionMark = view == null ? -1 : view.indexOf("?");
View Full Code Here

Examples of org.apache.isis.core.metamodel.adapter.ObjectAdapter.checkLock()

            final AuthenticationSession session = context.getSession();
            if (session == null && action.isVisible(new AnonymousSession(), object).isVetoed()) {
                throw new NotLoggedInException();
            }

            object.checkLock(context.getVersion(version));
            /*
             * Version adapterVersion = object.getVersion(); if
             * (adapterVersion.different(context.getVersion(version))) {
             *
             * IsisContext.getMessageBroker().addMessage("The " +
View Full Code Here

Examples of org.apache.isis.core.metamodel.adapter.ObjectAdapter.checkLock()

                    }
                    break;

                case ClientTransactionEvent.CHANGE:
                    final ObjectAdapter obj = getPersistentObjectAdapter(data[i]);
                    obj.checkLock(data[i].getVersion());

                    object = encoderDecoder.decode(data[i], knownObjects);
                    LOG.debug("  objectChanged " + data[i]);
                    getPersistenceSession().objectChanged(object);
                    changedObjects[i] = object;
View Full Code Here

Examples of org.apache.isis.core.metamodel.adapter.ObjectAdapter.checkLock()

                    changedObjects[i] = object;
                    break;

                case ClientTransactionEvent.DELETE:
                    final ObjectAdapter inObject = getPersistentObjectAdapter(data[i]);
                    inObject.checkLock(data[i].getVersion());

                    LOG.debug("  destroyObject " + data[i] + " for " + session);
                    disposedObjects[i] = inObject;
                    getPersistenceSession().destroyObject(inObject);
                    break;
View Full Code Here

Examples of org.apache.isis.core.metamodel.adapter.ObjectAdapter.checkLock()

    private ObjectAdapter getPersistentObjectAdapter(final AuthenticationSession session, final IdentityData object) {
        final ObjectAdapter obj = getPersistentObjectAdapter(object);
        if (LOG.isDebugEnabled()) {
            LOG.debug("get object " + object + " for " + session + " --> " + obj);
        }
        obj.checkLock(object.getVersion());
        return obj;
    }

    private ObjectAdapter getPersistentObjectAdapter(final ReferenceData object) {
        final ObjectSpecification spec = getSpecification(object.getType());
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.