|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.xtreemos.xosd.localallocmgr.basic.manipulators.FreeSlots
public class FreeSlots
Class used by local manager in order to determine
all free slots available for a resoruce. Also, the
time of the first and last reservation are set, in
order to provide an info about open intervals
before and agter reservations. If these values
are not set, it means, that the time table is empty
and there are no restraints regarding the reservations.
The time table elements (TTElm) returned can be
directly used for the reservation requests. Not that
the default type of the free slot element is a
MUTUAL lock.
Also note, that the free slots are only the
slots where there are no reservations whatsoever, and
do not include the ones where there are reservations,
but the reservation do not use max amount of the resource.
In order to get those slots, please use getSelection
method of a service/wrapper.
Field Summary | |
---|---|
java.util.GregorianCalendar |
firstOccupied
denotes the starting time of the first element in the table. if set at null, the table is empty and any value can be used. |
java.util.LinkedList<TTElm> |
free
holds TTElm objects denoting the free slots. |
java.util.GregorianCalendar |
lastOccupied
denotes the ending time of the last element in the table. if set at null, the table is empty and any value can be used. |
Constructor Summary | |
---|---|
FreeSlots(TimeTable source)
|
|
FreeSlots(TimeTable source,
java.util.GregorianCalendar from,
java.util.GregorianCalendar to)
|
Method Summary | |
---|---|
private void |
addNewFreeSlot(java.util.GregorianCalendar start,
java.util.GregorianCalendar end)
free slots are basic TTElm objects. |
private void |
findFree(java.util.LinkedList<TTElm> src)
returns the free slots from the whole stored interval |
private void |
findFree(java.util.LinkedList<TTElm> src,
java.util.GregorianCalendar from,
java.util.GregorianCalendar to)
return free slots between the given intervals. |
int |
size()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.util.GregorianCalendar firstOccupied
public java.util.GregorianCalendar lastOccupied
public java.util.LinkedList<TTElm> free
Constructor Detail |
---|
public FreeSlots(TimeTable source) throws AttributeConformanceException
AttributeConformanceException
public FreeSlots(TimeTable source, java.util.GregorianCalendar from, java.util.GregorianCalendar to) throws AttributeConformanceException
AttributeConformanceException
Method Detail |
---|
private void findFree(java.util.LinkedList<TTElm> src) throws AttributeConformanceException
src
-
AttributeConformanceException
private void findFree(java.util.LinkedList<TTElm> src, java.util.GregorianCalendar from, java.util.GregorianCalendar to) throws AttributeConformanceException
src
- from
- to
-
AttributeConformanceException
private void addNewFreeSlot(java.util.GregorianCalendar start, java.util.GregorianCalendar end)
start
- end
- public int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |