com.ontimize.util.gis.client.defaultimplementations.cache
Class RequestQueryWithDeleting
java.lang.Object
com.ontimize.util.gis.client.defaultimplementations.cache.RequestQueryWithDeleting
- All Implemented Interfaces:
- IRequestQuery
public class RequestQueryWithDeleting
- extends java.lang.Object
- implements IRequestQuery
Request query where previous pending requests are deleted when a new request arrives.
|
Method Summary |
void |
addRequest(java.lang.Object requestData,
java.lang.Object requesterId)
Add a new data request to the pending requests stack |
java.util.concurrent.locks.Condition |
getEmptyCondition()
Get the empty stack condition reference |
java.util.concurrent.locks.Lock |
getLock()
Get the reference of the pending requests stack lock |
int |
getQueriesStackSize()
|
java.lang.Object |
getRequest()
Get the new pending request located at the top of the stack |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
queryLock
protected java.util.concurrent.locks.Lock queryLock
emptyQueryCondition
protected java.util.concurrent.locks.Condition emptyQueryCondition
lastTickets
protected java.util.Hashtable<java.lang.Object,java.lang.Object> lastTickets
queryData
protected java.util.Stack<java.lang.Object> queryData
dataDispatcher
protected IGisDataDispatcher dataDispatcher
DEBUG
protected boolean DEBUG
RequestQueryWithDeleting
public RequestQueryWithDeleting()
getEmptyCondition
public java.util.concurrent.locks.Condition getEmptyCondition()
- Description copied from interface:
IRequestQuery
- Get the empty stack condition reference
- Specified by:
getEmptyCondition in interface IRequestQuery
- Returns:
- Empty request stack condition
getLock
public java.util.concurrent.locks.Lock getLock()
- Description copied from interface:
IRequestQuery
- Get the reference of the pending requests stack lock
- Specified by:
getLock in interface IRequestQuery
- Returns:
- Stack lock
addRequest
public void addRequest(java.lang.Object requestData,
java.lang.Object requesterId)
- Description copied from interface:
IRequestQuery
- Add a new data request to the pending requests stack
- Specified by:
addRequest in interface IRequestQuery
- Parameters:
requestData - Requested data descriptionrequesterId - Identifier for the requesting class
getRequest
public java.lang.Object getRequest()
- Description copied from interface:
IRequestQuery
- Get the new pending request located at the top of the stack
- Specified by:
getRequest in interface IRequestQuery
- Returns:
- First pending request
getQueriesStackSize
public int getQueriesStackSize()
- Specified by:
getQueriesStackSize in interface IRequestQuery