/*
(non-Javadoc)

@see com.ibm.ws.sib.processor.impl.interfaces.SIMPMessage#getHiddenExpiryTime()
356487
@Override
    public long getHiddenExpiryTime()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.entry(tc, "getHiddenExpiryTime");
            SibTr.exit(tc, "getHiddenExpiryTime", Long.valueOf(hiddenExpiryTime));
        }
        return hiddenExpiryTime;
    }
790650
@Override
    public List<DataSlice> getPersistentData() throws PersistentDataEncodingException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getPersistentData");

        //Late store of the currentMEArrivalTimestamp.  If the message is never stored
        //in the message store, then there's no point taking the hit of storing the
        //timestamp in the message
        if (!arrivalTimeStored)
        {
            msg.setCurrentMEArrivalTimestamp(currentMEArrivalTimeStamp);
            arrivalTimeStored = true;
        }
        if (producerConnectionUuid != null)
        {
            //see defect 278038
            //Late store of the currentMEArrivalTimestamp.  If the message is never stored
            //in the message store, then there's no point taking the hit
            msg.setConnectionUuid(producerConnectionUuid);
        }

        List<DataSlice> data = null;

        try
        {
            // Prevent any concurrent JsMessage property changes that may cause
            // a serialization error
            synchronized (messageSyncUpdateLock)
            {
                //get the message's data in a list of DataSlice objects
                data = msg.flatten(getOwningMessageStore());
            }
        } catch (MessageEncodeFailedException e)
        {
            FFDCFilter.processException(
                                        e,
                                        "com.ibm.ws.sib.processor.impl.store.items.MessageItem.getPersistentData",
                                        "1:861:1.244.1.40",
                                        this);

            SibTr.exception(tc, e);
            SibTr.error(tc, "MESSAGE_CORRUPT_ERROR_CWSIP0262",
                        new Object[] {
                        SIMPUtils.getStackTrace(e)
                        });

            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "getPersistentData", e);

            throw new PersistentDataEncodingException(
                            nls.getFormattedMessage(
                                                    "MESSAGE_CORRUPT_ERROR_CWSIP0262",
                                                    new Object[] {
                                                    e },
                                                    null),
                            e);
        } catch (MessageStoreException e)
        {
            // No FFDC code needed
            // We dont generate an FFDC here as this is sometimes acceptable behaviour - d542075

            SibTr.exception(tc, e);

            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "getPersistentData", e);

            throw new PersistentDataEncodingException(e);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "getPersistentData");

        return data;
    }
401239
@Override
    public long getMessageWaitTime()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.entry(this, tc, "getMessageWaitTime");
            SibTr.exit(this,
                       tc, "getMessageWaitTime", Long.valueOf(messageWaitTime));
        }

        return messageWaitTime;
    }
1311241
public Integer getLoginTimeout()
   {
      if (childNode.getTextValueForPatternName("login-timeout") != null && !childNode.getTextValueForPatternName("login-timeout").equals("null")) {
         return Integer.valueOf(childNode.getTextValueForPatternName("login-timeout"));
      }
      return null;
   }
94078
public final int getLoginTimeout() throws SQLException {
        try {
            if(!Driver.class.equals(type)) {
                return ((CommonDataSource) dataSourceOrDriver).getLoginTimeout();
            }
            //Return that the default value is being used when using the Driver type
            return 0;
        } catch (SQLException sqlX) {
            FFDCFilter.processException(sqlX, getClass().getName(), "1670", this);
            throw AdapterUtil.mapSQLException(sqlX, this);
        }
    }
938552
@Override
    public void setHiddenExpiryTime(long expiryTime)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.entry(tc, "setHiddenExpiryTime", Long.valueOf(expiryTime));
        }
        hiddenExpiryTime = expiryTime;
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.exit(tc, "setHiddenExpiryTime");
        }
    }
421918
public long getExecutionTime(TimeUnit timeUnit) {
        if (!ended) {
            throw new SystemException("Can't return execution time if Stopwatch wasn't started");
        }
        return timeUnit.convert(nanosEnd - nanosStart, TimeUnit.NANOSECONDS);
    }
543047
public static Date getTransactionTime() {
        final Stack<Date> stack = threadLocal.get();
        return stack != null ? stack.peek() : null;
    }
131847
private long getAllowedDate() {
        if (mSharedPreferences == null) {
            mSharedPreferences = mContext
                    .getSharedPreferences(PREFERENCES_GEOCODER, Context.MODE_PRIVATE);
            mAllowedDate = mSharedPreferences.getLong(KEY_ALLOW, 0);
        }
        return mAllowedDate;
    }
1283069
private E peekExpired() {
        // assert lock.isHeldByCurrentThread();
        E first = q.peek();
        return (first == null || first.getDelay(NANOSECONDS) > 0) ?
            null : first;
    }
752716
public com.google.protobuf.Timestamp getInsertTime() {
    return insertTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : insertTime_;
  }
1138486
public static long getNanoTime() {
        Object token = ThreadIdentityManager.runAsServer();
        try {
            return AccessController.doPrivileged( new PrivilegedAction<Long>() {
                @Override
                public Long run() {
                    return System.nanoTime();
                }
            } ).longValue();
        } finally {
            ThreadIdentityManager.reset(token);
        }
    }
749217
protected final long getWriteExpireTimeMS(boolean created) {
    try {
      Duration duration = created ? expiry.getExpiryForCreation() : expiry.getExpiryForUpdate();
      if (duration == null) {
        return Long.MIN_VALUE;
      } else if (duration.isZero()) {
        return 0L;
      } else if (duration.isEternal()) {
        return Long.MAX_VALUE;
      }
      return duration.getAdjustedTime(currentTimeMillis());
    } catch (Exception e) {
      logger.log(Level.WARNING, "Failed to get the policy's expiration time", e);
      return Long.MIN_VALUE;
    }
  }
1091822
public com.google.protobuf.Timestamp getTimestampValue() {
    if (typeCase_ == 5) {
      return (com.google.protobuf.Timestamp) type_;
    }
    return com.google.protobuf.Timestamp.getDefaultInstance();
  }
1329461
public long getReveseDNSCacheLifetime()
            throws NumberFormatException {

        long value = 60*60*1000;

        String property = getProperty(REVERSE_DNS_CACHE_LIFETIME);
        if (property != null && property.length() > 0) {
            long parsedValue = Long.parseLong(property);
            if (parsedValue > 0) {
                value = parsedValue;
            }
        }

        // System property takes precedence
        property = System.getProperty(REVERSE_DNS_CACHE_LIFETIME);
        if (property != null && property.length() > 0) {
            long parsedValue = Long.parseLong(property);
            if (parsedValue > 0) {
                value = parsedValue;
            }
        }

        return value;
    }
521772
public SIMPMessage getMessageLocked() throws MessageStoreException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getMessageLocked");
    
    SIMPMessage msg = null;
    
    if(classifyingMessages)
    {
      // Take the classifications read lock
      consumerSet.takeClassificationReadLock();

      // Classifications may change dynamically, so check the pendingReset
      // flag under this lock. If classifications have changed then we'll
      // set up the filters again
      if(pendingFlowReset)
      {
        pendingFlowReset = false;
        resetFlowProperties();
      }
        
      // Determine which cursor to use. chooseGetCursorIndex() will 
      // randomly choose an index if XD has specified weightings.
      // The method can be called more than once. This supports the situation
      // where we've looked for but not found any messages of a particular 
      // classification. 
      // 
      // If chooseGetCursorIndex() returns 0, then either no classifications were 
      // specified or we've already tried all the classifications. An index
      // of 0 leads to the use of the default (unclassified) cursor.
      int classIndex = -1;
      while(classIndex != 0)
      {
        classIndex = chooseGetCursorIndex(classIndex);
     
        // Always use the cursor straight from the key
        msg = getMessageLocked(classIndex);

        if(msg != null)
          classIndex = 0;
      }

      // Free the classifications read lock
      consumerSet.freeClassificationReadLock();
    }
    else // Not classifying
    {
      // Use the zeroth index
      msg = getMessageLocked(0);
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getMessageLocked", msg);

    return msg;
  }
1286389
public int getRemainingMessageCount()
      throws SISessionUnavailableException, SISessionDroppedException,
             SIConnectionUnavailableException, SIConnectionDroppedException
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc,"getRemainingMessageCount");
      checkValid();
      
      int remain = getUnSeenMessageCount();
      
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc,"getRemainingMessageCount", ""+remain);
      return remain;
   }