/*
(non-Javadoc)

@see com.ibm.ws.sib.store.AbstractItem#addPersistentDestinationData()
975224
@SuppressWarnings("unchecked")
    public void addPersistentDestinationData(HashMap hm)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "addPersistentDestinationData", hm);

        super.addPersistentData(hm);

        // Is the destination marked as to be deleted
        hm.put("toBeDeleted", Boolean.valueOf(_toBeDeleted));

        // Is the destination temporary
        hm.put("isTemporary", Boolean.valueOf(_isTemporary));

        hm.put("toBeIgnored", Boolean.valueOf(_toBeIgnored));

        // Is the destination localised on the home ME
        //hm.put("isLocal", Boolean.valueOf(isLocal));

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "addPersistentDestinationData");
    }
291427
private void createPersistentStore() throws MessageStoreException {
        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.entry(tc, "createPersistentStore");

        _persistentStore = new MessageProcessorStore(new SIBUuid8(_engine.getUuid()),
                        _msgStore, _txManager);

        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.exit(tc, "createPersistentStore");
    }
213305
public static function addPersistence($persistenceId, array $persistenceConf)
    {
        $manager = self::getDefaultManager();
        $configs = $manager->getOption(self::OPTION_PERSISTENCES);
        $configs[$persistenceId] = $persistenceConf;
        $manager->setOption(self::OPTION_PERSISTENCES, $configs);
        
        $manager->getServiceManager()->register(self::SERVICE_ID, $manager);
    }
80198
protected void putItem(final ItemData data)
   {
      cache.put(new CacheId(data.getIdentifier()), new CacheValue(data, System.currentTimeMillis() + liveTime));
      cache.put(new CacheQPath(data.getParentIdentifier(), data.getQPath(), ItemType.getItemType(data)),
         new CacheValue(data, System.currentTimeMillis() + liveTime));
   }
1257421
public List<DataSlice> getPersistentData() {
    List<DataSlice> slices = new ArrayList<DataSlice>(1);
    slices.add(new DataSlice(schema.toByteArray()));
    return slices;
  }
224352
@IocBean(name = "mqttClientPersistence")
    public MqttClientPersistence createMqttClientPersistence() {
        switch (conf.get(PROP_PERSISTENCE_TYPE, "memory")) {
        case "file":
            return new MqttDefaultFilePersistence(conf.get(PROP_PERSISTENCE_PATH, System.getProperty("user.dir")));
        default:
            return new MemoryPersistence();
        }
    }
470897
@Override
    public final List<DataSlice> readDataFromPersistence() throws SevereMessageStoreException
    {
        List<DataSlice> dataSlices;
        // lazy restoration only needed if the item was stored.  There is
        // no point trying to restore if there is no data.
        PersistentMessageStore pm = getMessageStoreImpl().getPersistentMessageStore();
        try
        {
            dataSlices = pm.readDataOnly(getTuple());
        } catch (PersistenceException pe)
        {
            com.ibm.ws.ffdc.FFDCFilter.processException(pe, "com.ibm.ws.sib.msgstore.cache.links.AbstractItemLink.readDataFromPersistence", "1:3271:1.241", this);
            throw new SevereMessageStoreException(pe);
        }

        return dataSlices;
    }
268327
public synchronized void addDeferredReferenceData(DeferredReferenceData refData) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "addDeferredReferenceData", "this=" + this, refData);
        }

        if (deferredReferenceDatas == null) {
            deferredReferenceDatas = new LinkedHashMap<DeferredReferenceData, Boolean>();
            if (parent != null && deferredReferenceDataEnabled) {
                parent.addDeferredReferenceData(this);
            }
        }
        deferredReferenceDatas.put(refData, null);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "addDeferredReferenceData");
        }
    }
376537
public void addData(int index, byte[] data) throws InternalLogException
  {
    if (tc.isEntryEnabled()) Tr.entry(tc, "addData",new java.lang.Object[] {new Integer(index), RLSUtils.toHexString(data,RLSUtils.MAX_DISPLAY_BYTES), this});

    // If the parent recovery log instance has experienced a serious internal error then prevent
    // this operation from executing.
    if (_recLog.failed())
    {
      if (tc.isEntryEnabled()) Tr.exit(tc, "addData",this);
      throw new InternalLogException(null);
    }

    // we use an index value of 0 to indicate that it is a singledata RUsection
    // so adjust now ... if (!_singleData) or if(index != 0)
    if (index > 0) index--;         

    // list items may be added in any order, so it may be necessary to (temporarily) pad the list
    final int currentSize = _writtenData.size();
    if (index == currentSize)
        _writtenData.add(/*index,*/ data);
    else if (index < currentSize)
    {
        if (tc.isDebugEnabled()) Tr.debug(tc, "NMTEST: Replacing item (expect trace 'null') at index: " + index, _writtenData.get(index));
        _writtenData.set(index, data);
    }
    else // index > currentSize
    {
        if (tc.isDebugEnabled()) Tr.debug(tc, "NMTEST: Adding null elements: " + (index-currentSize));
        while (index-- > currentSize)
            _writtenData.add(null);

        _writtenData.add(data);        
    }

    // set lastdata.  This method is called during recovery and we shouldn't get asked for
    // any data until all log records are read.  So set lastdata to be the item at the current size
    // of the array.  Items may be added in random order, so lastitem will be correct when
    // all items have been added
    _lastDataItem = (byte[]) _writtenData.get(_writtenData.size() -1);

    if (tc.isEntryEnabled()) Tr.exit(tc, "addData");
  }
758288
@Override
    public void updateStoreDefinition(StoreDefinition storeDef) {
        this.storeDef = storeDef;
        if(storeDef.hasRetentionPeriod())
            this.retentionTimeMs = storeDef.getRetentionDays() * Time.MS_PER_DAY;
    }
685958
private final void setPersNew() {
		status = ObjectState.PERSISTENT_NEW;
		stateFlags = PS_PERSISTENT | PS_TRANSACTIONAL | PS_DIRTY | PS_NEW;
		context.getSession().internalGetCache().notifyDirty(this);
	}
1076867
protected ItemData getPersistedItemData(NodeData parentData, QPathEntry name, ItemType itemType)
      throws RepositoryException
   {
      ItemData data = super.getItemData(parentData, name, itemType);
      if (cache.isEnabled())
      {
         if (data == null)
         {
            if (itemType == ItemType.NODE || itemType == ItemType.UNKNOWN)
            {
               cache.put(new NullNodeData(parentData, name));
            }
            else
            {
               cache.put(new NullPropertyData(parentData, name));
            }
         }
         else
         {
            cache.put(data);
         }
      }
      return data;
   }
455132
public void getPersistentData(ObjectOutputStream oos)
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "getPersistentData", oos);

    try
    {
      HashMap hm = new HashMap();

      hm.put("tick", new Long(_tick));
      hm.put("protocolState", new Byte(_protocolState));
      hm.put("storagePolicy", new Integer(_storagePolicy));

      oos.writeObject(hm);
    }
    catch (IOException e)
    {
      // FFDC
      FFDCFilter.processException(
        e,
        "com.ibm.ws.sib.processor.impl.store.items.AIProtocolItem.getPersistentData",
        "1:216:1.27",
        this);

      SIErrorException e2 = new SIErrorException(e);
      SibTr.exception(tc, e2);

      if (tc.isEntryEnabled())
        SibTr.exit(tc, "getPersistentData", e2);

      throw e2;
    }

    if (tc.isEntryEnabled())
      SibTr.exit(tc, "getPersistentData");
  }
1329641
public static void setPersistentMenus(List<PersistentMenu> persistentMenu) {
		PersistentMenuRequest persistentMenuRequest = new PersistentMenuRequest();
		persistentMenuRequest.addAllPersistentMenu(persistentMenu);
		FbBotMillNetworkController.postMessengerProfile(persistentMenuRequest);
	}
1006738
public void addPersistenceUnits(JPAPXml pxml) {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isDebugEnabled())
            Tr.debug(tc, "addPersistenceUnits", pxml);

        JPAPuScope puScope = pxml.getPuScope();
        String scopeKey = (puScope == JPAPuScope.EAR_Scope) ? EAR_SCOPE_MODULE_NAME : pxml.getArchiveName();

        JPAScopeInfo scopeInfo = null;
        synchronized (puScopes) {
            scopeInfo = puScopes.get(scopeKey);
            if (scopeInfo == null) {
                scopeInfo = new JPAScopeInfo(scopeKey, puScope);
                puScopes.put(scopeKey, scopeInfo);
            }
        }

        // delegate to scopeInfo to read in the persistence-unit data
        JPAIntrospection.beginPUScopeVisit(scopeInfo);
        try {
            scopeInfo.processPersistenceUnit(pxml, this);
        } finally {
            JPAIntrospection.endPUScopeVisit();
        }
    }
929060
public void putPersistent(DbEntity e) {
    CachedDbEntity cachedDbEntity = new CachedDbEntity();
    cachedDbEntity.setEntity(e);
    cachedDbEntity.setEntityState(PERSISTENT);
    cachedDbEntity.determineEntityReferences();
    cachedDbEntity.makeCopy();

    putInternal(cachedDbEntity);
  }
591383
public void setPersistenceDelegate(Class<?> type, PersistenceDelegate delegate)
	{
		if (type == null || delegate == null)
		{
			throw new NullPointerException();
		}
		delegates.put(type, delegate);
	}