/*
(non-Javadoc)

@see com.ibm.ws.sib.store.Cursor#getLockID()
964613
public final long getLockID()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.entry(this, tc, "getLockID");
            SibTr.exit(this, tc, "getLockID", Long.valueOf(_lockID));
        }
        return _lockID;
    }
1282002
protected String getLockProperty(String key) {
        return lockProps != null ? lockProps.getProperty(key) : null;
    }
596112
private IEntityLock[] retrieveLocks(Class entityType, String entityKey, Integer lockType)
            throws LockingException {
        Date expiration =
                (multiServer)
                        ? new Date(System.currentTimeMillis() - getLockToleranceMillis())
                        : new Date();

        return getLockStore().findUnexpired(expiration, entityType, entityKey, lockType, null);
    }
938121
public String getId()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getId");

    String id = this.getUuid();
   //we need something unique - therefore cannot use 
   //just topic space ID
   id += this.getRemoteEngineUuid();
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "getId", id);
    return id;
  }
140184
public String getId()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getId");
    String returnString = streamID.toString();
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getId", returnString);
    return returnString;
  }
57212
public long getSequenceID()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getSequenceID");
    long sequenceID=0;
    try
    {
      SIMPMessage msg = getSIMPMessage();
      if(msg!=null)
      {
        sequenceID = msg.getMessage().getGuaranteedValueValueTick();
      }
    }
    catch (SIResourceException e)
    {
      // No FFDC code needed
      SibTr.exception(tc, e);
    } 
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getSequenceID", Long.valueOf(sequenceID));
    return sequenceID;
  }
394398
@Override
    public synchronized Lock obtainWriteLock() {
        Set<File> readLocks = getReadLocks();
        if (readLocks.isEmpty()) {
            final File writeLock = getWriteLock();
            if (writeLock == null) {
                return createLock(true);
            }
        }

        return null;
    }
1132122
public String getId()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getId");
      
    String id = aiStream.getStreamId().toString();
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "getId");
    return id;
  }
1278200
public Long getId() {
        if (this.genericRecordAttributes.getId() != null) {
            return this.genericRecordAttributes.getId();
        } else if (this.typeARecordAttributes.getId() != null) {
            return this.typeARecordAttributes.getId();
        } else if (this.typeAAAARecordAttributes.getId() != null) {
            return this.typeAAAARecordAttributes.getId();
        } else if (this.typeNSRecordAttributes.getId() != null) {
            return this.typeNSRecordAttributes.getId();
        } else if (this.typeSOARecordAttributes.getId() != null) {
            return this.typeSOARecordAttributes.getId();
        } else if (this.typeMXRecordAttributes.getId() != null) {
            return this.typeMXRecordAttributes.getId();
        } else if (this.typePTRRecordAttributes.getId() != null) {
            return this.typePTRRecordAttributes.getId();
        } else if (this.typeTXTRecordAttributes.getId() != null) {
            return this.typeTXTRecordAttributes.getId();
        } else {
            return null;
        }
    }
854316
private ClientRWLock getBlockLock(long blockId) {
    // Loop until we either find the block lock in the mLocks map, or successfully acquire a new
    // block lock from the lock pool.
    while (true) {
      ClientRWLock blockLock;
      // Check whether a lock has already been allocated for the block id.
      synchronized (mSharedMapsLock) {
        blockLock = mLocks.get(blockId);
        if (blockLock != null) {
          blockLock.addReference();
          return blockLock;
        }
      }
      // Since a block lock hasn't already been allocated, try to acquire a new one from the pool.
      // Acquire the lock outside the synchronized section because #acquire might need to block.
      // We shouldn't wait indefinitely in acquire because the another lock for this block could be
      // allocated to another thread, in which case we could just use that lock.
      blockLock = mLockPool.acquire(1, TimeUnit.SECONDS);
      if (blockLock != null) {
        synchronized (mSharedMapsLock) {
          // Check if someone else acquired a block lock for blockId while we were acquiring one.
          if (mLocks.containsKey(blockId)) {
            mLockPool.release(blockLock);
            blockLock = mLocks.get(blockId);
          } else {
            mLocks.put(blockId, blockLock);
          }
          blockLock.addReference();
          return blockLock;
        }
      }
    }
  }
1187968
public String getID() {
        byte[] genBytes = new byte[_byteArraySize];
        synchronized(_random) {
            _random.nextBytes(genBytes);
        }
        String id = convertSessionIdBytesToSessionId(genBytes, _sessionIDLength);
        if (logger.isLoggable(Level.FINE)) {
            logger.logp(Level.FINE, methodClassName, "getSessionID", "sessionID=" + id);
        }
        return id;
    }
908828
@SuppressWarnings("WeakerAccess")
  public String getId() {
    // Constructor ensures that name is not null
    InstanceName fullName =
        Verify.verifyNotNull(InstanceName.parse(proto.getName()), "Name can never be null");

    //noinspection ConstantConditions
    return fullName.getInstance();
  }
376487
public String getID()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getID");
    String id = _streamId.toString();
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getID", id);
    return id;
  }
1022327
public String getElementId() {
		for (Entry<String, String> attribute : attributes.entrySet()) {
			if (attribute.getKey().equalsIgnoreCase("id")) {
				return attribute.getValue();
			}
		}
		return null;
	}
221054
public static byte[] nextID() {
        byte[] ID = new byte[15];
        synchronized (LOCK) {
            long timestamp = System.currentTimeMillis();
            if (timestamp != LAST_TIMESTAMP) {
                LAST_TIMESTAMP = timestamp;
                LAST_SEQUENCE = 0;
                TIMESTAMP_BUFFER[0] = (byte)(timestamp >>> 48);
                TIMESTAMP_BUFFER[1] = (byte)(timestamp >>> 40);
                TIMESTAMP_BUFFER[2] = (byte)(timestamp >>> 32);
                TIMESTAMP_BUFFER[3] = (byte)(timestamp >>> 24);
                TIMESTAMP_BUFFER[4] = (byte)(timestamp >>> 16);
                TIMESTAMP_BUFFER[5] = (byte)(timestamp >>>  8);
                TIMESTAMP_BUFFER[6] = (byte)(timestamp >>>  0);
            } else if (++LAST_SEQUENCE == 0) {
                throw new RuntimeException("Same ID generated in a single milliscond!");
            }
            ByteBuffer bb = ByteBuffer.wrap(ID);
            bb.put(TIMESTAMP_BUFFER);
            bb.put(MAC);
            bb.putShort(LAST_SEQUENCE);
        }
        return ID;
    }
659791
public String getTransactionId()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getTransactionId");
    
    String tranID = null;
    PersistentTranId pTranID = itemStream.getTransactionId();
    
    if (pTranID != null)
    {
      tranID = pTranID.toTMString(); 
    }
      
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getTransactionId", tranID);
    return tranID;
  }
751563
private boolean getLockInformation( final ITransaction transaction, final WebdavRequest req, final WebdavResponse resp )
        throws WebdavException, IOException
    {

        Node lockInfoNode = null;
        DocumentBuilder documentBuilder = null;

        documentBuilder = getDocumentBuilder();
        try
        {
            final Document document = documentBuilder.parse( new InputSource( req.getInputStream() ) );

            // Get the root element of the document
            final Element rootElement = document.getDocumentElement();

            lockInfoNode = rootElement;

            if ( lockInfoNode != null )
            {
                NodeList childList = lockInfoNode.getChildNodes();
                Node lockScopeNode = null;
                Node lockTypeNode = null;
                Node lockOwnerNode = null;

                Node currentNode = null;
                String nodeName = null;

                for ( int i = 0; i < childList.getLength(); i++ )
                {
                    currentNode = childList.item( i );

                    if ( currentNode.getNodeType() == Node.ELEMENT_NODE || currentNode.getNodeType() == Node.TEXT_NODE )
                    {

                        nodeName = currentNode.getNodeName();

                        if ( nodeName.endsWith( "locktype" ) )
                        {
                            lockTypeNode = currentNode;
                        }
                        if ( nodeName.endsWith( "lockscope" ) )
                        {
                            lockScopeNode = currentNode;
                        }
                        if ( nodeName.endsWith( "owner" ) )
                        {
                            lockOwnerNode = currentNode;
                        }
                    }
                    else
                    {
                        return false;
                    }
                }

                if ( lockScopeNode != null )
                {
                    String scope = null;
                    childList = lockScopeNode.getChildNodes();
                    for ( int i = 0; i < childList.getLength(); i++ )
                    {
                        currentNode = childList.item( i );

                        if ( currentNode.getNodeType() == Node.ELEMENT_NODE )
                        {
                            scope = currentNode.getNodeName();

                            if ( scope.endsWith( "exclusive" ) )
                            {
                                _exclusive = true;
                            }
                            else if ( scope.equals( "shared" ) )
                            {
                                _exclusive = false;
                            }
                        }
                    }
                    if ( scope == null )
                    {
                        return false;
                    }

                }
                else
                {
                    return false;
                }

                if ( lockTypeNode != null )
                {
                    childList = lockTypeNode.getChildNodes();
                    for ( int i = 0; i < childList.getLength(); i++ )
                    {
                        currentNode = childList.item( i );

                        if ( currentNode.getNodeType() == Node.ELEMENT_NODE )
                        {
                            _type = currentNode.getNodeName();

                            if ( _type.endsWith( "write" ) )
                            {
                                _type = "write";
                            }
                            else if ( _type.equals( "read" ) )
                            {
                                _type = "read";
                            }
                        }
                    }
                    if ( _type == null )
                    {
                        return false;
                    }
                }
                else
                {
                    return false;
                }

                if ( lockOwnerNode != null )
                {
                    childList = lockOwnerNode.getChildNodes();
                    for ( int i = 0; i < childList.getLength(); i++ )
                    {
                        currentNode = childList.item( i );

                        if ( currentNode.getNodeType() == Node.ELEMENT_NODE || currentNode.getNodeType() == Node.TEXT_NODE )
                        {
                            _lockOwner = currentNode.getTextContent();
                        }
                    }
                }
                if ( _lockOwner == null )
                {
                    return false;
                }
            }
            else
            {
                return false;
            }

        }
        catch ( final DOMException e )
        {
            resp.sendError( SC_INTERNAL_SERVER_ERROR );
            e.printStackTrace();
            return false;
        }
        catch ( final SAXException e )
        {
            resp.sendError( SC_INTERNAL_SERVER_ERROR );
            e.printStackTrace();
            return false;
        }

        return true;
    }