Read-only method: pass the call to the {@link ManagementDelegate}.
432134
public InputStream getObjectXML(Context context, String pid, String encoding)
            throws ServerException {
        return delegate.getObjectXML(context, pid, encoding);
    }
558084
public void readExternal(ObjectInput in) throws IOException,
			ClassNotFoundException {
		if(logger.isDebugEnabled()) {
        	logger.debug("readExternal");
        }
		sipFactoryImpl = (SipFactoryImpl) in.readObject();
		String sessionKeyString = in.readUTF();
		if(logger.isDebugEnabled()) {
        	logger.debug("readExternal - sessionKeyString=" + sessionKeyString);
        }
		if (sessionKeyString.length() > 0) {
			try {
				sessionKey = SessionManagerUtil.parseSipSessionKey(sessionKeyString);
				if(logger.isDebugEnabled()) {
		        	logger.debug("readExternal - sessionKey=" + sessionKey);
		        }
			} catch (ParseException e) {
				throw new IllegalArgumentException("SIP Sesion Key " + sessionKeyString + " previously serialized could not be reparsed", e);
			}
		}
		int attributesSize = in.readInt();
		if(attributesSize > 0) {
			Object[][] attributesArray = (Object[][] )in.readObject();
			attributes = new ConcurrentHashMap<String, Object>();
			for (int i = 0; i < attributesSize; i++) {
				String key = (String) attributesArray[0][i];
				Object value = attributesArray[1][i];
				attributes.put(key, value);
			}
		}
		if(in.readBoolean()) {
			transactionApplicationData = (TransactionApplicationData) in.readObject();
		}
		headerForm = HeaderForm.valueOf(in.readUTF());
		currentApplicationName = in.readUTF();
		if(currentApplicationName.equals("")) {
			currentApplicationName = null;
		}
		isMessageSent = in.readBoolean();
		if(ReplicationStrategy.EarlyDialog == StaticServiceHolder.sipStandardService.getReplicationStrategy()) {
			transactionId = in.readUTF();
			if (logger.isDebugEnabled()) {
				logger.debug("readExternal transactionId = " + transactionId);
			}
			if(transactionId != null) {
				if(transactionId.equals("")) {
					transactionId = null;
				} else {
					transactionType = in.readBoolean();
					if (logger.isDebugEnabled()) {
						logger.debug("readExternal transactionType = " + transactionType);
					}
				}
			}
		}
	}
933853
protected void silentlyVisitMethodNode(final MethodNode directMethodCallCandidate) {
        // visit is authorized because the classnode belongs to the same source unit
        ErrorCollector collector = new ErrorCollector(typeCheckingContext.getErrorCollector().getConfiguration());
        startMethodInference(directMethodCallCandidate, collector);
    }
465461
public <T> boolean registerDelegate(Delegate<T> delegate)
    {
        return null == delegateMapping.putIfAbsent(delegate.typeClass().getName(), 
                delegate);
    }
548828
public void readObject(java.io.DataInputStream dataInputStream,
                           ObjectManagerState objectManagerState)
                    throws ObjectManagerException {
        final String methodName = "readObject";
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass, methodName, new Object[] { dataInputStream,
                                                                objectManagerState });

        try {
            byte version = dataInputStream.readByte();
            if (Tracing.isAnyTracingEnabled() && trace.isDebugEnabled())
                trace.debug(this, cclass, methodName, new Object[] { new Byte(version) });
            super.readObject(dataInputStream, objectManagerState);

            if (dataInputStream.readByte() == 1) {
                // Use ManagedObjectInpuStream so as to get the correct classloader.
                java.io.ObjectInputStream objectInputStream = new ManagedObjectInputStream(dataInputStream, objectManagerState);
                comparator = (java.util.Comparator) objectInputStream.readObject();
                objectInputStream.close();
            } // if (dataInputStream.readByte() == 1).
            if (dataInputStream.readByte() == 1) {
                root = Token.restore(dataInputStream
                                     , objectManagerState
                                );
            } // if (dataInputStream.readByte() == 1).
            size = dataInputStream.readLong();

        } catch (java.io.IOException exception) {
            // No FFDC Code Needed.
            ObjectManager.ffdc.processException(this, cclass, methodName, exception, "1:2412:1.44");

            if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                trace.exit(this, cclass, methodName, exception);
            throw new PermanentIOException(this, exception);

        } catch (java.lang.ClassNotFoundException exception) {
            // No FFDC Code Needed.
            ObjectManager.ffdc.processException(this, cclass, methodName, exception, "1:2420:1.44");

            if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                trace.exit(this, cclass, methodName, new Object[] { "ClassNotFoundException:2423",
                                                                   exception });
            throw new com.ibm.ws.objectManager.ClassNotFoundException(this, exception);
        } // try.

        availableSize = size; // Start as last commited.

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass, methodName);
    }
841177
public final void zooActivateRead() {
		if (DBTracer.TRACE) DBTracer.logCall(this);
		switch (getStatus()) {
		case DETACHED_CLEAN:
			//nothing to do
			return;
		case HOLLOW_PERSISTENT_NONTRANSACTIONAL:
			try {
				Session session = context.getSession();
				session.lock();
				if (session.isClosed()) {
					throw DBLogger.newUser("The PersistenceManager of this object is not open.");
				}
				if (!session.isActive() && !session.getConfig().getNonTransactionalRead()) {
					throw DBLogger.newUser("The PersistenceManager of this object is not active " +
							"(-> use begin()).");
				}
				jdoZooGetNode().refreshObject(this);
			} finally {
				context.getSession().unlock();
			}
			return;
		case PERSISTENT_DELETED:
		case PERSISTENT_NEW_DELETED:
			throw DBLogger.newUser("The object has been deleted.");
		case PERSISTENT_NEW:
		case PERSISTENT_CLEAN:
		case PERSISTENT_DIRTY:
			//nothing to do
			return;
		case TRANSIENT:
		case TRANSIENT_CLEAN:
		case TRANSIENT_DIRTY:
			//not persistent yet
			return;

		default:
			throw new IllegalStateException("" + getStatus());
		}
	}
133284
@Override
    public void readExternal(PofReader reader) throws IOException {
        factory  = (Factory<List<E>>) reader.readObject(0);
        delegate = factory.create();
        reader.readCollection(1, delegate);
    }
807840
public void setReadOnly(final boolean readOnly) throws SQLException {
    try {
      logger.debug("conn={}({}) - set read-only to value {} {}",
          protocol.getServerThreadId(),
          protocol.isMasterConnection() ? "M" : "S",
          readOnly);
      stateFlag |= ConnectionState.STATE_READ_ONLY;
      protocol.setReadonly(readOnly);
    } catch (SQLException e) {
      throw ExceptionMapper.getException(e, this, null, false);
    }
  }
367065
private Method findGetDelegateMethod() {
		try {
			return Delegating.class.getDeclaredMethod("getDelegate", new Class[0]);
		} catch (NoSuchMethodException | SecurityException noSuchMethodException) {
			throw new IllegalStateException("getDelegate method not found on Delegating interface", noSuchMethodException);
		}
	}
1369204
private Permission createReadPermission(String table) {
        return _permissionResolver.resolvePermission(Permissions.readSorTable(new NamedResource(table)));
    }
1300065
def field2read_only(self, field, **kwargs):
        
        attributes = {}
        if field.dump_only:
            attributes["readOnly"] = True
        return attributes
637888
@Override
    public boolean deregisterEarlyRead() {
        // LI4335.2
        if (!this.bEarlyReads) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "User tried to deregister non-existent early read");
            }
            return false;
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "User deregistering early read interest");
        }
        this.bEarlyReads = false;
        // not sure if any read is actually outstanding but just in case...
        super.cancelOutstandingRead();

        if (isMessageSent()) {
            // finishRequest has been called already
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Error: full request already sent");
            }
            return false;
        }
        return true;
    }
194086
@Override
	public void setReadOnly(boolean readOnly) throws RemoteException {
		if (this.readOnly != readOnly) {
			tx.commit();
			this.readOnly = readOnly;
			try {
				tx = VanillaDb.txMgr().newTransaction(isolationLevel, readOnly);
			} catch (Exception e) {
				throw new RemoteException("error creating transaction ", e);
			}
		}
	}
257477
protected SIBusMessage readMessage (SIMessageHandle handle)
                throws ResourceException, SIMessageNotLockedException
    {
        final String methodName = "readMessage";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.entry(this, TRACE, methodName, handle);
        }

        SIBusMessage message = null;

        // If we are enlisted in the xa transaction then delete the message
        // under that transaction.
        if ((_xaResource != null) && (_xaResource.isEnlisted ()))
        {
            if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled ())
            {
                SibTr.debug(this, TRACE, "Deleting the message under the xa transaction (Handle=" + handle + ") (xaResource=" + _xaResource + ")");
            }

            message = readAndDeleteMessage(handle, _xaResource);
        }
        else
        {
            // If we have not been enlisted then we can assume that we have
            // inherited the transaction from the local thread which was imported
            // from the message itself. As such we can not delete the message
            // under this transaction because if the message rolls back the message
            // will be redelivered and we can not reuse the same transaction since
            // it is no longer a valid transaction. Once the transaction has been
            // imported then the message has done its "work" and we can auto commit
            // the deletion.
            if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled ())
            {
                SibTr.debug(this, TRACE, "xaResource is either null or is not enlisted so deleting the message non transactional (auto commit) (Handle=" + handle + ")");
            }

            message = readAndDeleteMessage(handle, null);
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.exit(this, TRACE, methodName, message);
        }

        return message;
    }
1054299
public void readObject(java.io.DataInputStream dataInputStream,
                           ObjectManagerState objectManagerState)
                    throws ObjectManagerException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass,
                        "readObject",
                        "DataInputStream="
                                        + dataInputStream
                                        + ", ObjectManagerState="
                                        + objectManagerState);

        try {
            byte version = dataInputStream.readByte();
            if (Tracing.isAnyTracingEnabled() && trace.isDebugEnabled())
                trace.debug(this, cclass
                            , "readObject"
                            , "version=" + version + "(byte)"
                                );
            super.readObject(dataInputStream,
                             objectManagerState);

            activeSubListCount = dataInputStream.readInt();
            subListTokens = new Token[activeSubListCount];

            for (int i = 0; i < subListTokens.length; i++) {
                subListTokens[i] = Token.restore(dataInputStream,
                                                 objectManagerState);
            } // for subLists.    

        } catch (java.io.IOException exception) {
            // No FFDC Code Needed.
            ObjectManager.ffdc.processException(this, cclass, "readObject", exception, "1:1280:1.26");

            if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                trace.exit(this, cclass
                           , "readObject"
                           , "via PermanentIOException"
                                );
            throw new PermanentIOException(this,
                                           exception);
        } // catch (java.io.IOException exception).

        // Force a full search when the first removeFirst operation occurs.
        headSequenceNumber = Long.MAX_VALUE;
        headSequenceNumberLock = new HeadSequenceNumberLock();
        tailSequenceNumber = 0;
        tailSequenceNumberLock = new TailSequenceNumberLock();
        subLists = new ConcurrentSubList[subListTokens.length];

        // Defect 322295
        // This check has been added to handle the case where a ConcurrentLinkedList 
        // has been deleted but only (some or all of) the sub list deletions were 
        // forced to the object store before a crash. 
        //
        //  i.e.  [subList del][subList del][OS Force][subList del][CLList del][crash]
        //
        // This results in the ConcurrentLinkedList having tokens that point to some sub 
        // lists that no longer have managed objects so the references being setup below 
        // could be null. At recovery time however these null references will be replaced
        // with DummyManagedObjects when each individual sub list delete is replayed by
        // the log. This results in a ClassCastException below.
        //
        // To avoid the exception we only add the real sub list managed objects to the 
        // array. This should be ok as once recovery has completed the entire linked list
        // should have been deleted so no exhaustive list of sub lists is required.
        //
        // TODO: Can we avoid this check by grouping transaction work into a single checkpoint?
        for (int i = 0; i < subListTokens.length; i++) {

            ManagedObject managedObject = subListTokens[i].getManagedObject();

            if (managedObject instanceof ConcurrentSubList)
            {
                subLists[i] = (ConcurrentSubList) managedObject;
            }
        } // for subList.

        // During recovery some of the sublists may not have completed their recovery when the concurrentList is found.
        // Also some of the links in the subLists may have already been deleted by later Transactions and so be 
        // unavailable during recovery.
        // Also if we look at the sublists during recovery we create cyclic dependancies between the overall 
        // lists and the subLists. We defer setting the tailSequenceNumber until first use of the list. 

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass,
                       "readObject");
    }
1286952
private Method getDelegateMethod(String title, Context ctxt)
	{
		Method m = delegateMethods.get(title);

		if (m == null)
		{
			List<PPattern> plist = null;
			String mname = title.substring(0, title.indexOf('('));

			// FIXME: this is to handle inheritance in the same way as VDMJ did. See CSV and IO, where the subclass
			// declared methods is in the tail of the list
			List<PDefinition> defs = new Vector<PDefinition>(definitions);
			Collections.reverse(defs);

			for (PDefinition d : defs)
			{
				if (d.getName().getName().equals(mname))
				{
					plist = null;

					if (ctxt.assistantFactory.createPDefinitionAssistant().isOperation(d))
					{
						if (d instanceof AExplicitOperationDefinition)
						{
							AExplicitOperationDefinition e = (AExplicitOperationDefinition) d;
							plist = e.getParameterPatterns();
						}
						else if (d instanceof AImplicitOperationDefinition)
						{
							AImplicitOperationDefinition e = (AImplicitOperationDefinition) d;
							plist = ctxt.assistantFactory.createAImplicitOperationDefinitionAssistant().getParamPatternList(e);
						}
					}
					else if (ctxt.assistantFactory.createPDefinitionAssistant().isFunction(d))
					{
						if (d instanceof AExplicitFunctionDefinition)
						{
							AExplicitFunctionDefinition e = (AExplicitFunctionDefinition) d;
							plist = e.getParamPatternList().get(0);
						}
						else if (d instanceof AImplicitFunctionDefinition)
						{
							AImplicitFunctionDefinition e = (AImplicitFunctionDefinition) d;
							plist = ctxt.assistantFactory.createAImplicitFunctionDefinitionAssistant().getParamPatternList(e).get(0);
						}
					}

					if (toTitle(mname, plist).equals(title))
					{
						break;
					}
				}
			}

			LexNameList anames = new LexNameList();
			List<Class<?>> ptypes = new Vector<Class<?>>();

			if (plist != null)
			{
				for (PPattern p : plist)
				{
					if (p instanceof AIdentifierPattern)
					{
						AIdentifierPattern ip = (AIdentifierPattern) p;
						anames.add(ip.getName());
						ptypes.add(Value.class);
					} else
					{
						throw new InternalException(56, "Native method cannot use pattern arguments: "
								+ title);
					}
				}

				delegateArgs.put(title, anames);
			} else
			{
				throw new InternalException(57, "Native member not found: "
						+ title);
			}

			// search with no context and default package + org.overture.lib
			InternalException searchException = null;
			Method basicMathod = null;
			try {
				basicMathod = getDelegateMethod(mname, ptypes);
			}catch(InternalException e)
			{
				searchException = e;
			}

			// search with context and default package + org.overture.lib this is preferred over no context
            try {
                ptypes.add(0,Context.class);
                m = getJavaDelegateMethod(mname, ptypes);
            }catch(InternalException e)
            {
                // Fine
            }

			if(m==null)
			{
				m = basicMathod;
			}



			if(m==null && searchException!=null)
			{
				throw searchException;
			}

			delegateMethods.put(title, m);
		}

		return m;
	}
408447
private CompletableFuture<Void> processReadResult(Iterator<Operation> readResult) {
        long traceId = LoggerHelpers.traceEnterWithContext(log, this.traceObjectId, "processReadResult");
        InputReadStageResult result = new InputReadStageResult(this.state);
        if (readResult == null) {
            // This happens when we get a TimeoutException from the read operation.
            logStageEvent("InputRead", result);
            LoggerHelpers.traceLeave(log, this.traceObjectId, "processReadResult", traceId);
            return CompletableFuture.completedFuture(null);
        }

        return Futures.loop(
                () -> canRun() && readResult.hasNext(),
                () -> {
                    Operation op = readResult.next();
                    return processOperation(op).thenRun(() -> {
                        // We have now internalized all operations from this batch; and even if subsequent operations in this iteration
                        // fail, we no longer need to re-read these operations, so update the state with the last read SeqNo.
                        this.state.setLastReadSequenceNumber(op.getSequenceNumber());
                        result.operationProcessed(op);
                    });
                },
                this.executor)
                .thenRun(() -> {
                    logStageEvent("InputRead", result);
                    LoggerHelpers.traceLeave(log, this.traceObjectId, "processReadResult", traceId);
                });
    }