This post is more than 5 years old
45 Posts
0
4635
January 12th, 2009 06:00
fully deleting a clip
Hi, I am trying to delete a clip using the
emea1_profile1_rdqeDcw.pea
profile. For this I use the following code
clip = new FPClip(this.centeraPool, clipId, FPLibraryConstants.FP_OPEN_ASTREE);
int errors = 0;
int numberOfBlobs = clip.getNumBlobs();
if (numberOfBlobs > 0) {
logger.trace(String.format("deleting %d tags of clip '%s'", numberOfBlobs, clipId));
FPTag tag = null;
while ((tag = clip.FetchNext()) != null) {
try {
if (tag.BlobExists() == 1) {
logger.debug("deleting BLOB");
tag.BlobPurge();
}
tag.Delete();
} catch (Exception e) {
errors++;
} finally {
close(tag);
}
}
}
close(clip);
clip = null;
if (errors > 0) {
logger.warn(
String.format("there have been %d errors while deleting tags of clip %s - the clip will not be deleted"
, errors
, clipId));
} else {
logger.info(
String.format("all tags of clip %s have been deleted successfully, deleting clip itself", clipId));
FPClip.AuditedDelete( this.centeraPool
, clipId
, String.format("%s/%s", this.applicationName, this.applicationVersion)
, FPLibraryConstants.FP_OPTION_DEFAULT_OPTIONS);
}
com.filepool.fplibrary.FPLibraryException: The use of this operation is restricted (transid='vie-vm-cre-ipc/25/PURGE_BLOB')
Purnawan_Henky
15 Posts
0
January 13th, 2009 02:00
Hi Chris,
To remove a clip and its data, you can just call FPClip.Delete().
If FPClip.Delete() successfully deletes a clip, then existing Blob will be an orphan blob
(if there is no other clip refer to that blob). The garbage collection then removes
all orphan blobs periodically.
Because in the single instance, clip and blob may have many-to-many relationship,
i'd like to recommend you to not call BlobPurge() inside your application.
Best regards,
Henky
gstuartemc
2 Intern
•
417 Posts
1
January 13th, 2009 03:00
Chris - Purge is only available on Basic edition, and this is the cause of the error you are seeing (as the online clusters are Compliance Edition models).
This API call is poitentially dangerous and has a very limited use case. With the latest versions of CentraStar (which incorporate more efficient Garbage Collection) then it is not necessary.
As Henky explained, you need only delete the Clip.