Package org.cdlib.mrt.zk
Class Access
java.lang.Object
org.cdlib.mrt.zk.QueueItem
org.cdlib.mrt.zk.Access
Class to manage a Merritt Access Assembly Request.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.cdlib.mrt.zk.QueueItem
QueueItem.BatchJobStates, QueueItem.ZkPaths, QueueItem.ZkPrefixes -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionAccess(Access.Queues queueName, String id) Access(Access.Queues queueName, String id, org.json.JSONObject data) -
Method Summary
Modifier and TypeMethodDescriptionstatic AccessacquirePendingAssembly(org.apache.zookeeper.ZooKeeper client, Access.Queues queueName) longstatic AccesscreateAssembly(org.apache.zookeeper.ZooKeeper client, Access.Queues queueName, org.json.JSONObject token) voiddelete(org.apache.zookeeper.ZooKeeper client) intdir()static Stringdir(Access.Queues queueName) static voidinitNodes(org.apache.zookeeper.ZooKeeper client) static IngestStatelistJobs(org.apache.zookeeper.ZooKeeper client, Access.Queues queueName, AccessState state) voidloadProperties(org.apache.zookeeper.ZooKeeper client, boolean setStatus) prefix()static StringprefixPath(Access.Queues queueName) states()token()url()Methods inherited from class org.cdlib.mrt.zk.QueueItem
createData, createOrSetData, data, id, intProperty, jsonDataProperty, jsonIntProperty, jsonLongProperty, jsonProperty, jsonStringProperty, load, load, loadStatus, lock, longProperty, makePath, optJsonProperty, optStringProperty, path, setData, setStatus, setStatus, setStatusTrigger, status, statusObject, stringProperty, unlock
-
Constructor Details
-
Access
- Parameters:
queueName- indicates large or small access queueid- Unique id assigned to an assembly request. This id is generated by creating a sequential queue item.
-
Access
- Parameters:
queueName- indicates large or small access queueid- Unique id assigned to an assembly request. This id is generated by creating a sequential item.data- JSON representation of an ingest initiated by a Merritt depostor.
-
-
Method Details
-
dir
-
dir
-
prefix
-
prefixPath
-
initStatus
-
resolveStatus
- Specified by:
resolveStatusin classQueueItem
-
loadProperties
public void loadProperties(org.apache.zookeeper.ZooKeeper client, boolean setStatus) throws org.apache.zookeeper.KeeperException, InterruptedException, MerrittZKNodeInvalid - Overrides:
loadPropertiesin classQueueItem- Throws:
org.apache.zookeeper.KeeperExceptionInterruptedExceptionMerrittZKNodeInvalid
-
token
-
deliveryNode
public int deliveryNode() -
cloudContentByte
public long cloudContentByte() -
tokenStatus
-
url
-
anticipatedAvailabilityTime
-
states
-
createAssembly
public static Access createAssembly(org.apache.zookeeper.ZooKeeper client, Access.Queues queueName, org.json.JSONObject token) throws org.apache.zookeeper.KeeperException, InterruptedException, MerrittZKNodeInvalid, MerrittStateError - Throws:
org.apache.zookeeper.KeeperExceptionInterruptedExceptionMerrittZKNodeInvalidMerrittStateError
-
delete
public void delete(org.apache.zookeeper.ZooKeeper client) throws MerrittStateError, MerrittZKNodeInvalid, org.apache.zookeeper.KeeperException, InterruptedException - Specified by:
deletein classQueueItem- Throws:
MerrittStateErrorMerrittZKNodeInvalidorg.apache.zookeeper.KeeperExceptionInterruptedException
-
acquirePendingAssembly
public static Access acquirePendingAssembly(org.apache.zookeeper.ZooKeeper client, Access.Queues queueName) throws MerrittZKNodeInvalid, org.apache.zookeeper.KeeperException, InterruptedException - Throws:
MerrittZKNodeInvalidorg.apache.zookeeper.KeeperExceptionInterruptedException
-
initNodes
public static void initNodes(org.apache.zookeeper.ZooKeeper client) throws org.apache.zookeeper.KeeperException, InterruptedException - Throws:
org.apache.zookeeper.KeeperExceptionInterruptedException
-
listJobs
public static List<Access> listJobs(org.apache.zookeeper.ZooKeeper client, Access.Queues queueName, AccessState state) throws org.apache.zookeeper.KeeperException, InterruptedException, MerrittZKNodeInvalid - Throws:
org.apache.zookeeper.KeeperExceptionInterruptedExceptionMerrittZKNodeInvalid
-