|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.vt.middleware.ed.SimpleArbitratedName
edu.vt.middleware.ed.AbstractReservation
edu.vt.middleware.ed.NameReservation
public final class NameReservation
Contains attributes that specify one temporary reservation.
| Field Summary | |
|---|---|
static int |
CREATED_BY_MAXLENGTH
Maximum length of created by |
static ArbitratedDataSource |
DEFAULT_DATASOURCE
data source default value |
static Integer |
DEFAULT_RESERVE_LENGTH_MILLIS
reservation duration default value |
static String |
DEFAULT_SERVICE_NAME
service attribute default value |
static String |
EXPIRATION_DATE_PARAMETER
Constant for named query |
private Calendar |
expirationDate
expiration date |
static String |
FIND_BY_EXPIRATION_DATE
Constant for named query |
static String |
FIND_BY_NAME
Constant for named query |
static String |
FIND_BY_NAME_AND_NAMESPACE
Constant for named query |
static String |
FIND_BY_NAME_CI
Constant for named query |
static String |
FIND_BY_NAME_CI_AND_NAMESPACE
Constant for named query |
static String |
FIND_BY_NAMESPACE
Constant for named query |
static String |
FIND_BY_RESERVE_HANDLE
Constant for named query |
static int |
MODIFIED_BY_MAXLENGTH
Maximum length of modified by |
static int |
NAME_MAXLENGTH
Maximum length of name |
static String |
NAME_PARAMETER
Constant for named query |
static String |
NAMESPACE_PARAMETER
Constant for named query |
static String |
RESERVE_HANDLE_PARAMETER
Constant for named query |
private String |
reserveHandle
reserve handle |
private Integer |
reserveMilliseconds
reservation duration (milliseconds) |
private static long |
serialVersionUID
serial version UID |
private String |
service
requesting service |
static int |
SERVICE_NAME_MAXLENGTH
Maximum length of service name |
| Fields inherited from class edu.vt.middleware.ed.AbstractReservation |
|---|
DEFAULT_DATASOURCE_CLIENT |
| Constructor Summary | |
|---|---|
NameReservation()
Default constructor. |
|
NameReservation(ArbitratedNamespace namespace,
String nameValue)
Initializes for a reservation creation request. |
|
| Method Summary | |
|---|---|
Integer |
computeReserveMilliseconds()
Computes the duration of the reservation from the creation date and expiration date, if both dates are set. |
private Integer |
copyInteger(Integer sourceVal)
Copies an Integer value into a new instance, to safely store the
value from / return the value to a calling routine. |
protected String |
coreAttributesToString()
Provides a string representation of the core attributes of the arbitrated entry. |
Calendar |
getExpirationDate()
Gets the expiration date of the reservation. |
String |
getReserveHandle()
Gets the handle assigned to the reservation. |
Integer |
getReserveMilliseconds()
Gets the length of time (duration) that the reservation is required, in milliseconds. |
String |
getService()
Gets the service that requested the reservation. |
Long |
getUid()
This returns the uid. |
String |
getUuid()
Gets the identifier for the reservation. |
protected String |
nonCoreAttributesToString()
Provides a string representation of the non-core attributes of the arbitrated entry. |
void |
reset()
Initializes the reservation instance to the empty state. |
void |
setExpirationDate(Calendar expirationDateValue)
Sets the expiration date of the reservation. |
void |
setReserveHandle(String reserveHandleValue)
Sets the handle assigned to the reservation. |
void |
setReserveMilliseconds(Integer reserveMillisecondsValue)
Sets the length of time (duration) that the reservation is required, in milliseconds. |
void |
setService(String serviceValue)
Sets the service that requested the reservation. |
void |
setUid(Long l)
This sets the uid. |
private void |
updateComputedReserveMilliseconds()
Updates the duration of the reservation by computing it from the creation date and expiration date. |
| Methods inherited from class edu.vt.middleware.ed.AbstractReservation |
|---|
copyCalendar, getCreatedBy, getCreationDate, getModificationDate, getModifiedBy, setCreatedBy, setCreationDate, setModificationDate, setModifiedBy |
| Methods inherited from class edu.vt.middleware.ed.SimpleArbitratedName |
|---|
clone, compareTo, getDataSource, getDn, getName, getNamespace, getRegistryNamespace, setDataSource, setDn, setName, setNamespace, setRegistryNamespace, toString, toStringFull, updateDataSource |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.vt.middleware.ed.MutableDataObject |
|---|
getModificationDate, getModifiedBy, setModificationDate, setModifiedBy |
| Methods inherited from interface edu.vt.middleware.ed.DataObject |
|---|
getCreatedBy, getCreationDate, setCreatedBy, setCreationDate |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Methods inherited from interface edu.vt.middleware.ed.ArbitratedName |
|---|
clone, getDataSource, getDn, getName, getNamespace, setDataSource, setDn, setName, setNamespace, toStringFull, updateDataSource |
| Field Detail |
|---|
public static final String FIND_BY_NAMESPACE
public static final String FIND_BY_NAME
public static final String FIND_BY_NAME_CI
public static final String FIND_BY_NAME_AND_NAMESPACE
public static final String FIND_BY_NAME_CI_AND_NAMESPACE
public static final String FIND_BY_EXPIRATION_DATE
public static final String FIND_BY_RESERVE_HANDLE
public static final String EXPIRATION_DATE_PARAMETER
public static final String NAME_PARAMETER
public static final String NAMESPACE_PARAMETER
public static final String RESERVE_HANDLE_PARAMETER
public static final String DEFAULT_SERVICE_NAME
public static final ArbitratedDataSource DEFAULT_DATASOURCE
public static final Integer DEFAULT_RESERVE_LENGTH_MILLIS
public static final int CREATED_BY_MAXLENGTH
public static final int MODIFIED_BY_MAXLENGTH
public static final int NAME_MAXLENGTH
public static final int SERVICE_NAME_MAXLENGTH
private static final long serialVersionUID
private String reserveHandle
private Integer reserveMilliseconds
private Calendar expirationDate
private String service
| Constructor Detail |
|---|
public NameReservation()
public NameReservation(ArbitratedNamespace namespace,
String nameValue)
namespace - the namespace in which the reservation is to be creatednameValue - the name of the reservation| Method Detail |
|---|
public Long getUid()
getUid in interface DataObjectgetUid in class AbstractReservationLong - uidpublic void setUid(Long l)
setUid in interface DataObjectsetUid in class AbstractReservationl - Long to setpublic String getReserveHandle()
public void setReserveHandle(String reserveHandleValue)
reserveHandleValue - the handle assigned to the reservation.public String getService()
public void setService(String serviceValue)
serviceValue - the service that requested the reservation.public Calendar getExpirationDate()
getExpirationDate in interface NamedDataObjectpublic void setExpirationDate(Calendar expirationDateValue)
setExpirationDate in interface NamedDataObjectexpirationDateValue - the date the reservation is to be
removed.public Integer getReserveMilliseconds()
public void setReserveMilliseconds(Integer reserveMillisecondsValue)
reserveMillisecondsValue - the number of milliseconds the
reservation is to exist. This value is used only if the
duration can not be determined from the creation and expiration
dates.private void updateComputedReserveMilliseconds()
public Integer computeReserveMilliseconds()
null is returned.public String getUuid()
getUuid in interface NamedDataObjectpublic void reset()
reset in class AbstractReservationprivate Integer copyInteger(Integer sourceVal)
Integer value into a new instance, to safely store the
value from / return the value to a calling routine.
sourceVal - value to copy
protected String coreAttributesToString()
coreAttributesToString in class AbstractReservationprotected String nonCoreAttributesToString()
nonCoreAttributesToString in class AbstractReservationSimpleArbitratedName.coreAttributesToString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||